Skip to content

Commit

Permalink
Rename candidates.proto to candidate_window.proto for better read…
Browse files Browse the repository at this point in the history
…ability.

PiperOrigin-RevId: 688832889
  • Loading branch information
Ruihao Huang authored and hiroyuki-komatsu committed Oct 23, 2024
1 parent 6ea9920 commit 389dd89
Show file tree
Hide file tree
Showing 44 changed files with 78 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/ios/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ mozc_cc_binary(
":ios_engine",
"//base:init_mozc_buildtool",
"//base/strings:unicode",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"@com_google_absl//absl/flags:flag",
Expand Down
2 changes: 1 addition & 1 deletion src/ios/ios_engine_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "base/init_mozc.h"
#include "base/strings/unicode.h"
#include "ios/ios_engine.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "protocol/config.pb.h"

Expand Down
2 changes: 1 addition & 1 deletion src/mac/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ mozc_objc_test(
":mozc_imk_input_controller",
"//base/mac:mac_util",
"//client:client_mock",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//renderer:renderer_interface",
"//testing:gunit_main_objc",
"@com_google_absl//absl/container:flat_hash_map",
Expand Down
2 changes: 1 addition & 1 deletion src/mac/mozc_imk_input_controller_test.mm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "absl/time/time.h"
#include "base/mac/mac_util.h"
#include "client/client_mock.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "renderer/renderer_interface.h"
#include "testing/gmock.h"
#include "testing/googletest.h"
Expand Down
20 changes: 10 additions & 10 deletions src/protocol/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ proto_library(
"commands.proto",
],
deps = [
":candidates_proto",
":candidate_window_proto",
":config_proto",
":engine_builder_proto",
":user_dictionary_storage_proto",
Expand All @@ -55,8 +55,8 @@ jspb_proto_library(
)

java_lite_proto_library(
name = "candidates_java_proto_lite",
deps = [":candidates_proto"],
name = "candidate_window_java_proto_lite",
deps = [":candidate_window_proto"],
)

java_lite_proto_library(
Expand Down Expand Up @@ -109,25 +109,25 @@ cc_proto_library(
)

proto_library(
name = "candidates_proto",
srcs = ["candidates.proto"],
name = "candidate_window_proto",
srcs = ["candidate_window.proto"],
)

cc_proto_library(
name = "candidates_cc_proto",
deps = [":candidates_proto"],
name = "candidate_window_cc_proto",
deps = [":candidate_window_proto"],
)

jspb_proto_library(
name = "candidates_jspb_proto",
deps = [":candidates_proto"],
name = "candidate_window_jspb_proto",
deps = [":candidate_window_proto"],
)

proto_library(
name = "state_proto",
srcs = ["state.proto"],
deps = [
":candidates_proto",
":candidate_window_proto",
":commands_proto",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

// Protocol messages of candidate window to be used for mozc client/server
// communication and client/renderer communication.
// TODO(b/372854886): Rename file to candidate_window.proto.

syntax = "proto2";

Expand Down
2 changes: 1 addition & 1 deletion src/protocol/commands.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ syntax = "proto2";

package mozc.commands;

import "protocol/candidates.proto";
import "protocol/candidate_window.proto";
import "protocol/config.proto";
import "protocol/engine_builder.proto";
import "protocol/user_dictionary_storage.proto";
Expand Down
18 changes: 9 additions & 9 deletions src/protocol/protocol.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
'targets': [
{
'target_name': 'genproto_candidates_proto',
'target_name': 'genproto_candidate_window_proto',
'type': 'none',
'toolsets': ['host'],
'sources': [
'candidates.proto',
'candidate_window.proto',
],
'includes': [
'../protobuf/genproto.gypi',
Expand All @@ -48,18 +48,18 @@
],
},
{
'target_name': 'candidates_proto',
'target_name': 'candidate_window_proto',
'type': 'static_library',
'hard_dependency': 1,
'sources': [
'<(proto_out_dir)/<(relative_dir)/candidates.pb.cc',
'<(proto_out_dir)/<(relative_dir)/candidate_window.pb.cc',
],
'dependencies': [
'<(mozc_oss_src_dir)/protobuf/protobuf.gyp:protobuf',
'genproto_candidates_proto#host',
'genproto_candidate_window_proto#host',
],
'export_dependent_settings': [
'genproto_candidates_proto#host',
'genproto_candidate_window_proto#host',
],
},
{
Expand All @@ -86,7 +86,7 @@
],
'dependencies': [
'<(mozc_oss_src_dir)/protobuf/protobuf.gyp:protobuf',
'candidates_proto',
'candidate_window_proto',
'config_proto',
'engine_builder_proto',
'genproto_commands_proto#host',
Expand Down Expand Up @@ -163,7 +163,7 @@
'../protobuf/genproto.gypi',
],
'dependencies': [
'genproto_candidates_proto',
'genproto_candidate_window_proto',
'genproto_commands_proto',
],
},
Expand All @@ -176,7 +176,7 @@
],
'dependencies': [
'<(mozc_oss_src_dir)/protobuf/protobuf.gyp:protobuf',
'candidates_proto',
'candidate_window_proto',
'commands_proto',
'genproto_state_proto#host',
],
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ syntax = "proto2";

package mozc.protocol;

import "protocol/candidates.proto";
import "protocol/candidate_window.proto";
import "protocol/commands.proto";

message SessionState {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ mozc_objc_library(
"//base/mac:mac_util",
"//client:client_interface",
"//mac:common",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"@com_google_absl//absl/log",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/mac/CandidateView.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#import <Cocoa/Cocoa.h>

#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/renderer_command.pb.h"

namespace mozc {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/mac/InfolistView.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#import <Cocoa/Cocoa.h>

#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/renderer_command.pb.h"

namespace mozc {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/qt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ mozc_cc_qt_library(
deps = [
"//base:coordinates",
"//client:client_interface",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"//renderer:renderer_style_handler",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/qt/qt_window_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "absl/strings/str_cat.h"
#include "base/coordinates.h"
#include "client/client_interface.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "renderer/renderer_style_handler.h"
#include "renderer/window_util.h"
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/win32/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mozc_cc_library(
"//bazel/win32:msimg32",
"//bazel/win32:user32",
"//client:client_interface",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"//renderer:renderer_style_handler",
Expand Down Expand Up @@ -213,7 +213,7 @@ mozc_cc_library(
"//bazel/win32:gdi32",
"//bazel/win32:user32",
"//client:client_interface",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"//renderer:renderer_style_handler",
Expand All @@ -234,7 +234,7 @@ mozc_cc_library(
":win32_renderer_util",
"//base:coordinates",
"//client:client_interface",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"//renderer:window_util",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/win32/candidate_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "base/coordinates.h"
#include "base/win32/wide_char.h"
#include "client/client_interface.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/renderer_command.pb.h"
#include "renderer/renderer_style_handler.h"
#include "renderer/table_layout.h"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/win32/candidate_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "base/const.h"
#include "base/coordinates.h"
#include "client/client_interface.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "renderer/table_layout.h"
#include "renderer/win32/text_renderer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/win32/infolist_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "base/vlog.h"
#include "base/win32/wide_char.h"
#include "client/client_interface.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "protocol/renderer_command.pb.h"
#include "protocol/renderer_style.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/win32/window_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "absl/log/check.h"
#include "base/coordinates.h"
#include "client/client_interface.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "protocol/renderer_command.pb.h"
#include "renderer/win32/candidate_window.h"
Expand Down
14 changes: 7 additions & 7 deletions src/session/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ mozc_cc_library(
"//composer",
"//converter:converter_interface",
"//converter:segments",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//request:conversion_request",
Expand Down Expand Up @@ -101,7 +101,7 @@ mozc_cc_test(
"//converter:segments",
"//converter:segments_matchers",
"//data_manager/testing:mock_data_manager",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//request:conversion_request",
Expand Down Expand Up @@ -199,7 +199,7 @@ mozc_cc_test(
"//engine",
"//engine:engine_mock",
"//engine:mock_data_engine_factory",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//request:conversion_request",
Expand Down Expand Up @@ -238,7 +238,7 @@ mozc_cc_test(
"//engine",
"//engine:mock_data_engine_factory",
"//engine:user_data_manager_interface",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//request:request_test_util",
Expand Down Expand Up @@ -495,7 +495,7 @@ mozc_cc_library(
"//base:clock",
"//base:vlog",
"//config:stats_config_util",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:state_cc_proto",
"//usage_stats",
Expand Down Expand Up @@ -695,7 +695,7 @@ mozc_cc_library(
"//engine:engine_interface",
"//engine:user_data_manager_interface",
"//prediction:user_history_predictor",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//request:request_test_util",
Expand Down Expand Up @@ -724,7 +724,7 @@ mozc_cc_binary(
"//data_manager/oss:oss_data_manager",
"//data_manager/testing:mock_data_manager",
"//engine",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/status",
Expand Down
4 changes: 2 additions & 2 deletions src/session/internal/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mozc_cc_library(
"//base/strings:assign",
"//composer",
"//converter:segments",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -205,7 +205,7 @@ mozc_cc_test(
"//base:text_normalizer",
"//base:util",
"//converter:segments",
"//protocol:candidates_cc_proto",
"//protocol:candidate_window_cc_proto",
"//protocol:commands_cc_proto",
"//testing:gunit_main",
"@com_google_absl//absl/strings:string_view",
Expand Down
2 changes: 1 addition & 1 deletion src/session/internal/session_output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "base/version.h"
#include "composer/composer.h"
#include "converter/segments.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "session/internal/candidate_list.h"

Expand Down
4 changes: 3 additions & 1 deletion src/session/internal/session_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "absl/strings/string_view.h"
#include "composer/composer.h"
#include "converter/segments.h"
#include "protocol/candidates.pb.h"
#include "protocol/candidate_window.pb.h"
#include "protocol/commands.pb.h"
#include "session/internal/candidate_list.h"

Expand All @@ -51,11 +51,13 @@ class SessionOutput {
SessionOutput(const SessionOutput &) = delete;
SessionOutput &operator=(const SessionOutput &) = delete;

// TODO(b/372854886): Revise the comment.
// Fill the Candidates_Candidate protobuf with the contents of candidate.
static void FillCandidate(
const Segment &segment, const Candidate &candidate,
commands::CandidateWindow_Candidate *candidate_proto);

// TODO(b/372854886): Rename the function to FillCandidateWindow.
// Fill the Candidates protobuf with the contents of candidate_list.
static void FillCandidates(const Segment &segment,
const CandidateList &candidate_list,
Expand Down
Loading

0 comments on commit 389dd89

Please sign in to comment.