From 2ee029df0bbcbb1dfe5f3d3d6fcc7885ba5eea70 Mon Sep 17 00:00:00 2001 From: Yeunjoo Choi Date: Thu, 11 Nov 2021 02:11:12 +0000 Subject: [PATCH] Change namespace to ash for //ash/services/ime Codes in //ash/services/ime are a part of the ash-chrome, so namespace is changed to ash. This CL is part of the Chrome OS source code directory migration: https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE. Bug: 1164001 Change-Id: Ib32db96afec720a21b518913cdfa69ac4dc210fd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3269789 Commit-Queue: Yeunjoo Choi Reviewed-by: Hidehiko Abe Owners-Override: Hidehiko Abe Cr-Commit-Position: refs/heads/main@{#940616} --- ash/services/ime/constants.cc | 4 +- ash/services/ime/constants.h | 8 +--- ash/services/ime/decoder/decoder_engine.cc | 4 +- ash/services/ime/decoder/decoder_engine.h | 4 +- ash/services/ime/decoder/system_engine.cc | 4 +- ash/services/ime/decoder/system_engine.h | 4 +- .../ime/decoder/system_engine_unittest.cc | 12 ++--- ash/services/ime/ime_decoder.cc | 4 +- ash/services/ime/ime_decoder.h | 4 +- ash/services/ime/ime_sandbox_hook.cc | 4 +- ash/services/ime/ime_sandbox_hook.h | 4 +- ash/services/ime/ime_service.cc | 9 ++-- ash/services/ime/ime_service.h | 4 +- ash/services/ime/ime_service_unittest.cc | 17 ++++--- ash/services/ime/input_engine.h | 4 +- ash/services/ime/mock_input_channel.cc | 4 +- ash/services/ime/mock_input_channel.h | 4 +- .../ime/public/cpp/rulebased/engine.cc | 4 +- .../ime/public/cpp/rulebased/engine.h | 4 +- .../public/cpp/rulebased/rulebased_fuzzer.cc | 6 +-- .../cpp/rulebased/rulebased_unittest.cc | 4 +- .../ime/public/cpp/rulebased/rules_data.cc | 4 +- .../ime/public/cpp/rulebased/rules_data.h | 4 +- .../ime/public/cpp/shared_lib/interfaces.h | 4 +- ash/services/ime/public/cpp/suggestions.h | 11 +---- ash/services/ime/public/mojom/BUILD.gn | 18 ++++---- .../ime/public/mojom/ime_service.mojom | 2 +- .../ime/public/mojom/input_engine.mojom | 2 +- .../ime/public/mojom/input_method.mojom | 44 +++++++++---------- .../ime/public/mojom/input_method_host.mojom | 34 +++++++------- ash/services/ime/public/mojom/mojom_traits.cc | 16 +++---- ash/services/ime/public/mojom/mojom_traits.h | 41 +++++++++-------- ash/services/ime/public/proto/messages.proto | 2 +- ash/services/ime/rule_based_engine.cc | 4 +- ash/services/ime/rule_based_engine.h | 4 +- .../ash/input_method/assistive_suggester.cc | 6 +-- .../assistive_suggester_unittest.cc | 6 +-- .../ash/input_method/emoji_suggester.cc | 6 +-- .../input_method/emoji_suggester_unittest.cc | 6 +-- .../ash/input_method/ime_service_connector.cc | 8 ++-- .../ash/input_method/ime_service_connector.h | 11 +++-- .../input_method/input_method_manager_impl.cc | 2 +- .../input_method/input_method_manager_impl.h | 3 +- .../ash/input_method/input_method_settings.cc | 2 +- .../ash/input_method/input_method_settings.h | 2 +- .../input_method_settings_unittest.cc | 2 +- .../ash/input_method/multi_word_suggester.cc | 6 +-- .../multi_word_suggester_unittest.cc | 6 +-- .../native_input_method_engine.cc | 4 +- .../input_method/native_input_method_engine.h | 34 +++++++------- .../native_input_method_engine_unittest.cc | 3 -- .../input_method/personal_info_suggester.cc | 6 +-- .../personal_info_suggester_unittest.cc | 6 +-- .../ash/input_method/suggestions_collector.cc | 10 ++--- .../ash/input_method/suggestions_collector.h | 4 +- .../suggestions_collector_unittest.cc | 19 ++++---- .../suggestions_service_client.cc | 6 +-- .../suggestions_service_client_unittest.cc | 8 ++-- .../chrome_extensions_dispatcher_delegate.cc | 11 +++-- .../chromeos_ime_service_bindings.js | 30 ++++++------- chrome/utility/services.cc | 4 +- content/utility/utility_main.cc | 2 +- .../cpp/perfetto/trace_string_lookup.cc | 2 +- ui/base/ime/ash/input_method_manager.h | 3 +- ui/base/ime/ash/input_method_ukm.cc | 6 +-- ui/base/ime/ash/input_method_ukm.h | 2 +- ui/base/ime/ash/mock_input_method_manager.cc | 2 +- ui/base/ime/ash/mock_input_method_manager.h | 3 +- 68 files changed, 254 insertions(+), 283 deletions(-) diff --git a/ash/services/ime/constants.cc b/ash/services/ime/constants.cc index a52226a01a5de5..ce0a7820ba2cea 100644 --- a/ash/services/ime/constants.cc +++ b/ash/services/ime/constants.cc @@ -12,7 +12,7 @@ #define FPL FILE_PATH_LITERAL #define IME_DIR_STRING "input_methods" -namespace chromeos { +namespace ash { namespace ime { const base::FilePath::CharType kInputMethodsDirName[] = @@ -39,4 +39,4 @@ const base::FilePath::CharType kLanguageDataDirName[] = const char kGoogleKeyboardDownloadDomain[] = "dl.google.com"; } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/constants.h b/ash/services/ime/constants.h index e808583d0b2b57..785071f2c27e4e 100644 --- a/ash/services/ime/constants.h +++ b/ash/services/ime/constants.h @@ -8,7 +8,7 @@ #include "base/component_export.h" #include "base/files/file_path.h" -namespace chromeos { +namespace ash { namespace ime { // The path where ChromeOS default input methods is installed, consisting of @@ -33,13 +33,7 @@ extern const base::FilePath::CharType kLanguageDataDirName[]; // The domain of Google Keyboard language dictionary download URL. COMPONENT_EXPORT(ASH_IME_CONSTANTS) extern const char kGoogleKeyboardDownloadDomain[]; -} // namespace ime -} // namespace chromeos -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace ime { -using ::chromeos::ime::kBundledInputMethodsDirPath; } // namespace ime } // namespace ash diff --git a/ash/services/ime/decoder/decoder_engine.cc b/ash/services/ime/decoder/decoder_engine.cc index 4769a6734bf5a0..19387debd00e9a 100644 --- a/ash/services/ime/decoder/decoder_engine.cc +++ b/ash/services/ime/decoder/decoder_engine.cc @@ -9,7 +9,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -114,4 +114,4 @@ void DecoderEngine::ProcessMessage(const std::vector& message, } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/decoder/decoder_engine.h b/ash/services/ime/decoder/decoder_engine.h index 9fde03014ff160..b87e7bcfd3797a 100644 --- a/ash/services/ime/decoder/decoder_engine.h +++ b/ash/services/ime/decoder/decoder_engine.h @@ -17,7 +17,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace chromeos { +namespace ash { namespace ime { // A Mojo wrapper around a "decoder" that converts key events and pointer events @@ -59,6 +59,6 @@ class DecoderEngine : public mojom::InputChannel { }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_DECODER_DECODER_ENGINE_H_ diff --git a/ash/services/ime/decoder/system_engine.cc b/ash/services/ime/decoder/system_engine.cc index 9c4b2eae0d33e7..a1d117bddb163c 100644 --- a/ash/services/ime/decoder/system_engine.cc +++ b/ash/services/ime/decoder/system_engine.cc @@ -10,7 +10,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" -namespace chromeos { +namespace ash { namespace ime { SystemEngine::SystemEngine(ImeCrosPlatform* platform) : platform_(platform) { @@ -49,4 +49,4 @@ bool SystemEngine::IsConnected() { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/decoder/system_engine.h b/ash/services/ime/decoder/system_engine.h index 71f6a868578bcd..2dc1ac5d9f8bb2 100644 --- a/ash/services/ime/decoder/system_engine.h +++ b/ash/services/ime/decoder/system_engine.h @@ -18,7 +18,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace chromeos { +namespace ash { namespace ime { // An enhanced implementation of the basic InputEngine that uses a built-in @@ -53,6 +53,6 @@ class SystemEngine : public InputEngine { }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_DECODER_SYSTEM_ENGINE_H_ diff --git a/ash/services/ime/decoder/system_engine_unittest.cc b/ash/services/ime/decoder/system_engine_unittest.cc index b7fe2ddbda7ba4..96704c90bda4d2 100644 --- a/ash/services/ime/decoder/system_engine_unittest.cc +++ b/ash/services/ime/decoder/system_engine_unittest.cc @@ -11,7 +11,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace chromeos { +namespace ash { namespace ime { constexpr char kImeSpec[] = "xkb:us::eng"; @@ -30,20 +30,20 @@ mojo::ScopedMessagePipeHandle MessagePipeHandleFromInt(uint32_t handle) { struct MockInputMethod : public mojom::InputMethod { MOCK_METHOD(void, OnFocus, - (chromeos::ime::mojom::InputFieldInfoPtr input_field_info, - chromeos::ime::mojom::InputMethodSettingsPtr settings), + (mojom::InputFieldInfoPtr input_field_info, + mojom::InputMethodSettingsPtr settings), (override)); MOCK_METHOD(void, OnBlur, (), (override)); MOCK_METHOD(void, OnSurroundingTextChanged, (const std::string& text, uint32_t offset, - chromeos::ime::mojom::SelectionRangePtr selection_range), + mojom::SelectionRangePtr selection_range), (override)); MOCK_METHOD(void, OnCompositionCanceledBySystem, (), (override)); MOCK_METHOD(void, ProcessKeyEvent, - (chromeos::ime::mojom::PhysicalKeyEventPtr event, + (mojom::PhysicalKeyEventPtr event, ProcessKeyEventCallback callback), (override)); MOCK_METHOD(void, @@ -196,4 +196,4 @@ TEST_F(SystemEngineTest, CanReceiveMessagesAfterBinding) { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/ime_decoder.cc b/ash/services/ime/ime_decoder.cc index 9456a1e7d4a58d..eb7b49d2deb23b 100644 --- a/ash/services/ime/ime_decoder.cc +++ b/ash/services/ime/ime_decoder.cc @@ -10,7 +10,7 @@ #include "base/files/file_util.h" #include "base/logging.h" -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -142,4 +142,4 @@ void FakeDecoderEntryPointsForTesting( // IN-TEST } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/ime_decoder.h b/ash/services/ime/ime_decoder.h index efcea6af19a735..58f061f2e3d84b 100644 --- a/ash/services/ime/ime_decoder.h +++ b/ash/services/ime/ime_decoder.h @@ -11,7 +11,7 @@ #include "base/scoped_native_library.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace chromeos { +namespace ash { namespace ime { // A proxy class for the IME decoder. @@ -76,6 +76,6 @@ void FakeDecoderEntryPointsForTesting( const ImeDecoder::EntryPoints& decoder_entry_points); } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_IME_DECODER_H_ diff --git a/ash/services/ime/ime_sandbox_hook.cc b/ash/services/ime/ime_sandbox_hook.cc index 05f8c4a4f937ab..d920ee5b20e210 100644 --- a/ash/services/ime/ime_sandbox_hook.cc +++ b/ash/services/ime/ime_sandbox_hook.cc @@ -18,7 +18,7 @@ using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -83,4 +83,4 @@ bool ImePreSandboxHook(sandbox::policy::SandboxLinux::Options options) { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/ime_sandbox_hook.h b/ash/services/ime/ime_sandbox_hook.h index b1f0e9a6461021..abc85cc4c21dd6 100644 --- a/ash/services/ime/ime_sandbox_hook.h +++ b/ash/services/ime/ime_sandbox_hook.h @@ -7,12 +7,12 @@ #include "sandbox/policy/linux/sandbox_linux.h" -namespace chromeos { +namespace ash { namespace ime { bool ImePreSandboxHook(sandbox::policy::SandboxLinux::Options options); } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_IME_SANDBOX_HOOK_H_ diff --git a/ash/services/ime/ime_service.cc b/ash/services/ime/ime_service.cc index 28af403b0f5456..e31e4cb2418099 100644 --- a/ash/services/ime/ime_service.cc +++ b/ash/services/ime/ime_service.cc @@ -22,7 +22,7 @@ #include "base/task/sequenced_task_runner.h" #include "mojo/public/c/system/thunks.h" -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -142,11 +142,10 @@ void ImeService::RunInMainSequence(ImeSequencedTask task, int task_id) { bool ImeService::IsFeatureEnabled(const char* feature_name) { if (strcmp(feature_name, "AssistiveEmojiEnhanced") == 0) { - return base::FeatureList::IsEnabled( - chromeos::features::kAssistEmojiEnhanced); + return base::FeatureList::IsEnabled(features::kAssistEmojiEnhanced); } if (strcmp(feature_name, "AssistiveMultiWord") == 0) { - return chromeos::features::IsAssistiveMultiWordEnabled(); + return features::IsAssistiveMultiWordEnabled(); } if (strcmp(feature_name, "AssistiveMultiWordLacrosSupport") == 0) { return base::FeatureList::IsEnabled( @@ -238,4 +237,4 @@ ImeCrosDownloader* ImeService::GetDownloader() { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/ime_service.h b/ash/services/ime/ime_service.h index e4abba50fdde34..a38c478f659f7a 100644 --- a/ash/services/ime/ime_service.h +++ b/ash/services/ime/ime_service.h @@ -20,7 +20,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/receiver_set.h" -namespace chromeos { +namespace ash { namespace ime { class ImeService : public mojom::ImeService, @@ -97,6 +97,6 @@ class ImeService : public mojom::ImeService, }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_IME_SERVICE_H_ diff --git a/ash/services/ime/ime_service_unittest.cc b/ash/services/ime/ime_service_unittest.cc index fdb5c92638f4c4..b5f27ea66011dd 100644 --- a/ash/services/ime/ime_service_unittest.cc +++ b/ash/services/ime/ime_service_unittest.cc @@ -24,7 +24,7 @@ using testing::_; -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -74,16 +74,15 @@ class TestDecoderState : public mojom::InputMethod { private: // mojom::InputMethod: - void OnFocus(chromeos::ime::mojom::InputFieldInfoPtr input_field_info, - chromeos::ime::mojom::InputMethodSettingsPtr settings) override { - } + void OnFocus(mojom::InputFieldInfoPtr input_field_info, + mojom::InputMethodSettingsPtr settings) override {} void OnBlur() override {} void OnSurroundingTextChanged( const std::string& text, uint32_t offset, - chromeos::ime::mojom::SelectionRangePtr selection_range) override {} + mojom::SelectionRangePtr selection_range) override {} void OnCompositionCanceledBySystem() override {} - void ProcessKeyEvent(chromeos::ime::mojom::PhysicalKeyEventPtr event, + void ProcessKeyEvent(mojom::PhysicalKeyEventPtr event, ProcessKeyEventCallback callback) override {} void OnCandidateSelected(uint32_t selected_candidate_index) override {} @@ -163,8 +162,8 @@ class ImeServiceTest : public testing::Test, public mojom::InputMethodHost { void HandleAutocorrect(mojom::AutocorrectSpanPtr autocorrect_span) override {} void RequestSuggestions(mojom::SuggestionsRequestPtr request, RequestSuggestionsCallback callback) override {} - void DisplaySuggestions(const std::vector<::chromeos::ime::TextSuggestion>& - suggestions) override {} + void DisplaySuggestions( + const std::vector& suggestions) override {} void UpdateCandidatesWindow(mojom::CandidatesWindowPtr window) override {} void RecordUkm(mojom::UkmEntryPtr entry) override {} void ReportKoreanAction(mojom::KoreanAction action) override {} @@ -698,4 +697,4 @@ TEST_F(ImeServiceTest, KhmerKeyboardAltGr) { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/input_engine.h b/ash/services/ime/input_engine.h index 05320ee6be6a26..b74df6d2fe0de3 100644 --- a/ash/services/ime/input_engine.h +++ b/ash/services/ime/input_engine.h @@ -5,7 +5,7 @@ #ifndef ASH_SERVICES_IME_INPUT_ENGINE_H_ #define ASH_SERVICES_IME_INPUT_ENGINE_H_ -namespace chromeos { +namespace ash { namespace ime { // Base class for all input engines. @@ -17,6 +17,6 @@ struct InputEngine { }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_INPUT_ENGINE_H_ diff --git a/ash/services/ime/mock_input_channel.cc b/ash/services/ime/mock_input_channel.cc index 8755478712c651..704eb8bebcd8d1 100644 --- a/ash/services/ime/mock_input_channel.cc +++ b/ash/services/ime/mock_input_channel.cc @@ -4,7 +4,7 @@ #include "ash/services/ime/mock_input_channel.h" -namespace chromeos { +namespace ash { namespace ime { MockInputChannel::MockInputChannel() : receiver_(this) {} @@ -30,4 +30,4 @@ void MockInputChannel::ProcessMessage(const std::vector& message, } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/mock_input_channel.h b/ash/services/ime/mock_input_channel.h index a68c193e479408..a310c5c78d0add 100644 --- a/ash/services/ime/mock_input_channel.h +++ b/ash/services/ime/mock_input_channel.h @@ -12,7 +12,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "testing/gmock/include/gmock/gmock.h" -namespace chromeos { +namespace ash { namespace ime { // A mock receiver InputChannel. @@ -36,6 +36,6 @@ class MockInputChannel : public mojom::InputChannel { }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_MOCK_INPUT_CHANNEL_H_ diff --git a/ash/services/ime/public/cpp/rulebased/engine.cc b/ash/services/ime/public/cpp/rulebased/engine.cc index cfb260f747c2c3..14b1d0a9a56304 100644 --- a/ash/services/ime/public/cpp/rulebased/engine.cc +++ b/ash/services/ime/public/cpp/rulebased/engine.cc @@ -7,7 +7,7 @@ #include "ash/services/ime/public/cpp/rulebased/rules_data.h" #include "base/strings/utf_string_conversions.h" -namespace chromeos { +namespace ash { namespace ime { namespace rulebased { @@ -148,4 +148,4 @@ ProcessKeyResult Engine::ProcessBackspace() { } // namespace rulebased } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/public/cpp/rulebased/engine.h b/ash/services/ime/public/cpp/rulebased/engine.h index 78191dd2c1c2b5..9a15f983dd2bb7 100644 --- a/ash/services/ime/public/cpp/rulebased/engine.h +++ b/ash/services/ime/public/cpp/rulebased/engine.h @@ -10,7 +10,7 @@ #include "ash/services/ime/public/mojom/input_method.mojom.h" -namespace chromeos { +namespace ash { namespace ime { namespace rulebased { @@ -69,6 +69,6 @@ class Engine { } // namespace rulebased } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_PUBLIC_CPP_RULEBASED_ENGINE_H_ diff --git a/ash/services/ime/public/cpp/rulebased/rulebased_fuzzer.cc b/ash/services/ime/public/cpp/rulebased/rulebased_fuzzer.cc index e07efc970782a0..27f9277010194c 100644 --- a/ash/services/ime/public/cpp/rulebased/rulebased_fuzzer.cc +++ b/ash/services/ime/public/cpp/rulebased/rulebased_fuzzer.cc @@ -12,11 +12,11 @@ #include "base/cxx17_backports.h" #include "testing/libfuzzer/proto/lpm_interface.h" -namespace rulebased = chromeos::ime::rulebased; -namespace mojom = chromeos::ime::mojom; - namespace { +namespace rulebased = ::ash::ime::rulebased; +namespace mojom = ::ash::ime::mojom; + // Must match ash/services/ime/public/cpp/rulebased/rulebased_fuzzer.proto constexpr mojom::DomCode kKeyCodes[] = { mojom::DomCode::kBackquote, mojom::DomCode::kDigit1, diff --git a/ash/services/ime/public/cpp/rulebased/rulebased_unittest.cc b/ash/services/ime/public/cpp/rulebased/rulebased_unittest.cc index e83dbf63f60914..5502db1dc23756 100644 --- a/ash/services/ime/public/cpp/rulebased/rulebased_unittest.cc +++ b/ash/services/ime/public/cpp/rulebased/rulebased_unittest.cc @@ -11,7 +11,7 @@ #include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -242,4 +242,4 @@ TEST_F(RulebasedImeTest, Transforms_deva_phone) { } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/public/cpp/rulebased/rules_data.cc b/ash/services/ime/public/cpp/rulebased/rules_data.cc index 0ada5b39c12331..2c656f88c42c16 100644 --- a/ash/services/ime/public/cpp/rulebased/rules_data.cc +++ b/ash/services/ime/public/cpp/rulebased/rules_data.cc @@ -43,7 +43,7 @@ #include "base/strings/utf_string_conversions.h" #include "third_party/re2/src/re2/re2.h" -namespace chromeos { +namespace ash { namespace ime { namespace rulebased { @@ -434,4 +434,4 @@ bool RulesData::PredictTransform(const std::string& str, int transat) const { } // namespace rulebased } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/public/cpp/rulebased/rules_data.h b/ash/services/ime/public/cpp/rulebased/rules_data.h index 05fdaf9359b9d1..21288aded1efb0 100644 --- a/ash/services/ime/public/cpp/rulebased/rules_data.h +++ b/ash/services/ime/public/cpp/rulebased/rules_data.h @@ -16,7 +16,7 @@ namespace re2 { class RE2; } // namespace re2 -namespace chromeos { +namespace ash { namespace ime { namespace rulebased { @@ -91,6 +91,6 @@ class RulesData { } // namespace rulebased } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_PUBLIC_CPP_RULEBASED_RULES_DATA_H_ diff --git a/ash/services/ime/public/cpp/shared_lib/interfaces.h b/ash/services/ime/public/cpp/shared_lib/interfaces.h index 003d5ce712d9cc..fa32ee17c011c1 100644 --- a/ash/services/ime/public/cpp/shared_lib/interfaces.h +++ b/ash/services/ime/public/cpp/shared_lib/interfaces.h @@ -62,7 +62,7 @@ // copy of the MojoSystemThunks struct definition. struct MojoSystemThunks; -namespace chromeos { +namespace ash { namespace ime { // Callback upon async completion of DownloadToFile(), passing the originally @@ -272,6 +272,6 @@ typedef bool (*ConnectToInputMethodFn)(const char*, typedef bool (*IsInputMethodConnectedFn)(); } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_PUBLIC_CPP_SHARED_LIB_INTERFACES_H_ diff --git a/ash/services/ime/public/cpp/suggestions.h b/ash/services/ime/public/cpp/suggestions.h index 668673893ee45f..6cd589762aa735 100644 --- a/ash/services/ime/public/cpp/suggestions.h +++ b/ash/services/ime/public/cpp/suggestions.h @@ -7,7 +7,7 @@ #include -namespace chromeos { +namespace ash { namespace ime { enum class TextSuggestionMode { @@ -45,15 +45,6 @@ struct TextCompletionCandidate { float score; }; -} // namespace ime -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -namespace ime { -using ::chromeos::ime::TextCompletionCandidate; -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; } // namespace ime } // namespace ash diff --git a/ash/services/ime/public/mojom/BUILD.gn b/ash/services/ime/public/mojom/BUILD.gn index d81119ad1a8c7c..08bc6a579f5dda 100644 --- a/ash/services/ime/public/mojom/BUILD.gn +++ b/ash/services/ime/public/mojom/BUILD.gn @@ -22,23 +22,23 @@ mojom("mojom") { { types = [ { - mojom = "chromeos.ime.mojom.CompletionCandidate" - cpp = "::chromeos::ime::TextCompletionCandidate" + mojom = "ash.ime.mojom.CompletionCandidate" + cpp = "::ash::ime::TextCompletionCandidate" }, { - mojom = "chromeos.ime.mojom.SuggestionMode" - cpp = "::chromeos::ime::TextSuggestionMode" + mojom = "ash.ime.mojom.SuggestionMode" + cpp = "::ash::ime::TextSuggestionMode" }, { - mojom = "chromeos.ime.mojom.SuggestionType" - cpp = "::chromeos::ime::TextSuggestionType" + mojom = "ash.ime.mojom.SuggestionType" + cpp = "::ash::ime::TextSuggestionType" }, { - mojom = "chromeos.ime.mojom.SuggestionCandidate" - cpp = "::chromeos::ime::TextSuggestion" + mojom = "ash.ime.mojom.SuggestionCandidate" + cpp = "::ash::ime::TextSuggestion" }, { - mojom = "chromeos.ime.mojom.TextRange" + mojom = "ash.ime.mojom.TextRange" cpp = "::gfx::Range" }, ] diff --git a/ash/services/ime/public/mojom/ime_service.mojom b/ash/services/ime/public/mojom/ime_service.mojom index 4903590e83228f..7ecd9aa732e666 100644 --- a/ash/services/ime/public/mojom/ime_service.mojom +++ b/ash/services/ime/public/mojom/ime_service.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module chromeos.ime.mojom; +module ash.ime.mojom; import "ash/services/ime/public/mojom/input_engine.mojom"; import "ash/services/ime/public/mojom/input_method.mojom"; diff --git a/ash/services/ime/public/mojom/input_engine.mojom b/ash/services/ime/public/mojom/input_engine.mojom index a97be2d01236b3..76bd53cbc93eb7 100644 --- a/ash/services/ime/public/mojom/input_engine.mojom +++ b/ash/services/ime/public/mojom/input_engine.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module chromeos.ime.mojom; +module ash.ime.mojom; // A message channel is a paired message sender and receiver. It provides the // communication channel between the IME extension process and the core IME diff --git a/ash/services/ime/public/mojom/input_method.mojom b/ash/services/ime/public/mojom/input_method.mojom index 16d02707cd380b..1a8d8ed728b1a2 100644 --- a/ash/services/ime/public/mojom/input_method.mojom +++ b/ash/services/ime/public/mojom/input_method.mojom @@ -8,10 +8,10 @@ // Next MinVersion: 7 -module chromeos.ime.mojom; +module ash.ime.mojom; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.KeyEventType"] enum KeyEventType { kKeyDown = 0, kKeyUp = 1, @@ -24,7 +24,7 @@ enum KeyEventType { // IMEs do not handle it and it is safe for the OS to handle the key itself. // // Next ordinal: 17 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.NamedDomKey"] enum NamedDomKey { [Default] kOther = 0, kAlt = 1, @@ -58,7 +58,7 @@ enum NamedDomKey { // union types. We may need to revisit this type in the future. // // Next ordinal: 2 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.DomKey"] union DomKey { // If the key is a key with a "named key attribute" in: // https://www.w3.org/TR/uievents-key/#named-key-attribute-value @@ -75,7 +75,7 @@ union DomKey { // https://www.w3.org/TR/uievents-key/#keys-modifier // // Next ordinal: 6 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.ModifierState"] struct ModifierState { bool alt@0; bool alt_graph@1; @@ -93,7 +93,7 @@ struct ModifierState { // Chrome OS first-party IMEs, consider deprecating the value. // // Next ordinal: 61 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.DomCode"] enum DomCode { [Default] kOther = 0, kBackquote = 1, @@ -161,7 +161,7 @@ enum DomCode { // Information about a physical key event. // // Next ordinal: 4 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.PhysicalKeyEvent"] struct PhysicalKeyEvent { KeyEventType type@0; DomKey key@1; @@ -175,7 +175,7 @@ struct PhysicalKeyEvent { }; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.KeyEventResult"] enum KeyEventResult { // The event should be handled by the system. kNeedsHandlingBySystem = 0, @@ -190,7 +190,7 @@ enum KeyEventResult { // See https://developer.mozilla.org/en-US/docs/Web/API/Selection // // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.SelectionRange"] struct SelectionRange { uint32 anchor@0; uint32 focus@1; @@ -198,7 +198,7 @@ struct SelectionRange { // Type of input field. // Based off ui::TextInputType in ui/base/ime/text_input_type.h. -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputFieldType"] enum InputFieldType { // Does not support IME editing. IMEs should only send physical key events, // and not perform complex operations such as composition. @@ -216,7 +216,7 @@ enum InputFieldType { }; // Next ordinal: 2 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.AutocorrectMode"] enum AutocorrectMode { // The IME must not perform autocorrect. [Default] kDisabled = 0, @@ -225,7 +225,7 @@ enum AutocorrectMode { }; // Next ordinal: 2 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.PersonalizationMode"] enum PersonalizationMode { // The IME should not use anything from the input field to update any // personalized data (e.g. to improve suggestions quality). Personalization @@ -238,7 +238,7 @@ enum PersonalizationMode { }; // Next ordinal: 3 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.InputFieldInfo"] struct InputFieldInfo { InputFieldType type@0; AutocorrectMode autocorrect@1; @@ -248,7 +248,7 @@ struct InputFieldInfo { // Next ordinal: 4 // TODO(crbug/1201949): Note that the Extensible keyword is not supported for // union types. We may need to revisit this type in the future. -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputMethodSettings"] union InputMethodSettings { KoreanSettings korean_settings@0; LatinSettings latin_settings@1; @@ -257,7 +257,7 @@ union InputMethodSettings { }; // Next ordinal: 9 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KoreanLayout"] enum KoreanLayout { [Default] kDubeolsik = 0, kDubeolsikOldHangeul = 1, @@ -271,7 +271,7 @@ enum KoreanLayout { }; // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.KoreanSettings"] struct KoreanSettings { // Whether to allow users to type multiple syllables in one composition. bool input_multiple_syllables@0; @@ -281,7 +281,7 @@ struct KoreanSettings { }; // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.LatinSettings"] struct LatinSettings { // Whether to enable autocorrect as the user is typing. bool autocorrect@0; @@ -295,7 +295,7 @@ struct LatinSettings { // syllable will also show results for "ang". // This is useful for users with different regional accents. // Next ordinal: 12 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.FuzzyPinyinSettings"] struct FuzzyPinyinSettings { bool an_ang@0; bool en_eng@1; @@ -312,7 +312,7 @@ struct FuzzyPinyinSettings { }; // Next ordinal: 3 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.PinyinLayout"] enum PinyinLayout { [Default] kUsQwerty = 0, kDvorak = 1, @@ -320,7 +320,7 @@ enum PinyinLayout { }; // Next ordinal: 7 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.PinyinSettings"] struct PinyinSettings { [MinVersion=6] FuzzyPinyinSettings? fuzzy_pinyin@0; [MinVersion=6] PinyinLayout layout@1; @@ -332,7 +332,7 @@ struct PinyinSettings { }; // Next ordinal: 0 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.ZhuyinSettings"] struct ZhuyinSettings { }; @@ -342,7 +342,7 @@ struct ZhuyinSettings { // interface to communicate back to the browser process. // // Next ordinal: 6 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.InputMethod"] interface InputMethod { // Called when there's a new focused input field. OnFocus@0(InputFieldInfo input_field_info, diff --git a/ash/services/ime/public/mojom/input_method_host.mojom b/ash/services/ime/public/mojom/input_method_host.mojom index e1bf9e1dc155d3..9c0980467c57ea 100644 --- a/ash/services/ime/public/mojom/input_method_host.mojom +++ b/ash/services/ime/public/mojom/input_method_host.mojom @@ -8,20 +8,20 @@ // Next MinVersion: 4 -module chromeos.ime.mojom; +module ash.ime.mojom; import "ash/services/ime/public/mojom/input_method.mojom"; import "mojo/public/mojom/base/string16.mojom"; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.CommitTextCursorBehavior"] enum CommitTextCursorBehavior { kMoveCursorAfterText = 0, kMoveCursorBeforeText = 1, }; // Next ordinal: 1 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.CompositionSpanStyle"] enum CompositionSpanStyle { // Default composition style. Usually, this adds an underline to the span. [Default] kDefault = 0, @@ -33,7 +33,7 @@ enum CompositionSpanStyle { // The indices are relative to the composition text. // // Next ordinal: 3 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.CompositionSpan"] struct CompositionSpan { uint32 start@0; uint32 end@1; @@ -42,14 +42,14 @@ struct CompositionSpan { // A range of text. `start` can be equal to or greater than `end`. // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.TextRange"] struct TextRange { uint32 start; uint32 end; }; // Next ordinal: 3 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.AutocorrectSpan"] struct AutocorrectSpan { // The range to set the autocorrect span to, currently having `current_text`. TextRange autocorrect_range@0; @@ -71,7 +71,7 @@ struct AutocorrectSpan { // Proposed candidate for completing some text. // // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.CompletionCandidate"] struct CompletionCandidate { // The candidate text string text@0; @@ -81,7 +81,7 @@ struct CompletionCandidate { }; // Next ordinal: 3 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.SuggestionMode"] enum SuggestionMode { [Default] kUnknown = 0, @@ -97,7 +97,7 @@ enum SuggestionMode { }; // Next ordinal: 4 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.SuggestionType"] enum SuggestionType { [Default] kUnknown = 0, @@ -114,7 +114,7 @@ enum SuggestionType { // Single request to generate suggestion candidates from the given context. // // Next ordinal: 3 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.SuggestionsRequest"] struct SuggestionsRequest { // The mode of suggestions that should be generated. SuggestionMode mode@0; @@ -129,7 +129,7 @@ struct SuggestionsRequest { // The text candidate to use as a suggestion to the user. // // Next ordinal: 3 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.SuggestionCandidate"] struct SuggestionCandidate { // How should a consumer use this suggestion. SuggestionMode mode@0; @@ -144,7 +144,7 @@ struct SuggestionCandidate { // Encapsulates the results of a suggestions request. // // Next ordinal: 1 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.SuggestionsResponse"] struct SuggestionsResponse { // A list of suggestion candidates generated. array candidates@0; @@ -159,7 +159,7 @@ union UkmEntry { // numeric values should never be reused. // // Next ordinal: 4 -[Stable, Extensible] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputMethodApiOperation"] enum InputMethodApiOperation { [Default] kUnknown = 0, kCommitText = 1, @@ -168,7 +168,7 @@ enum InputMethodApiOperation { }; // Next ordinal: 1 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.NonCompliantApiMetric"] struct NonCompliantApiMetric { InputMethodApiOperation non_compliant_operation@0; }; @@ -176,7 +176,7 @@ struct NonCompliantApiMetric { // A candidate shown in the candidates window. // // Next ordinal: 2 -[Stable] +[Stable, RenamedFrom="chromeos.ime.mojom.Candidate"] struct Candidate { string text@0; @@ -195,7 +195,7 @@ struct Candidate { // current input. It is usually shown as a window below the current composition. // // Next ordinal: 1 -[Stable, MinVersion=2] +[Stable, MinVersion=2, RenamedFrom="chromeos.ime.mojom.CandidatesWindow"] struct CandidatesWindow { // List of candidates to be displayed. Must not be empty. array candidates@0; @@ -207,7 +207,7 @@ struct CandidatesWindow { // Metrics enum for various actions that can be performed on the Korean IME. // // Next ordinal: 4 -[Extensible, Stable, MinVersion=3] +[Extensible, Stable, MinVersion=3, RenamedFrom="chromeos.ime.mojom.KoreanAction"] enum KoreanAction { [Default] kUnknown = 0, // The user pressed the Hanja key. diff --git a/ash/services/ime/public/mojom/mojom_traits.cc b/ash/services/ime/public/mojom/mojom_traits.cc index a93afdfd0cbb59..fd580b6bd51f47 100644 --- a/ash/services/ime/public/mojom/mojom_traits.cc +++ b/ash/services/ime/public/mojom/mojom_traits.cc @@ -10,15 +10,15 @@ namespace mojo { namespace { using CompletionCandidateDataView = - chromeos::ime::mojom::CompletionCandidateDataView; -using SuggestionMode = chromeos::ime::mojom::SuggestionMode; -using SuggestionType = chromeos::ime::mojom::SuggestionType; + ::ash::ime::mojom::CompletionCandidateDataView; +using SuggestionMode = ::ash::ime::mojom::SuggestionMode; +using SuggestionType = ::ash::ime::mojom::SuggestionType; using SuggestionCandidateDataView = - chromeos::ime::mojom::SuggestionCandidateDataView; -using TextCompletionCandidate = chromeos::ime::TextCompletionCandidate; -using TextSuggestionMode = chromeos::ime::TextSuggestionMode; -using TextSuggestionType = chromeos::ime::TextSuggestionType; -using TextSuggestion = chromeos::ime::TextSuggestion; + ::ash::ime::mojom::SuggestionCandidateDataView; +using TextCompletionCandidate = ::ash::ime::TextCompletionCandidate; +using TextSuggestionMode = ::ash::ime::TextSuggestionMode; +using TextSuggestionType = ::ash::ime::TextSuggestionType; +using TextSuggestion = ::ash::ime::TextSuggestion; } // namespace diff --git a/ash/services/ime/public/mojom/mojom_traits.h b/ash/services/ime/public/mojom/mojom_traits.h index 6954cf00d4031c..e21ba8224ca536 100644 --- a/ash/services/ime/public/mojom/mojom_traits.h +++ b/ash/services/ime/public/mojom/mojom_traits.h @@ -14,33 +14,33 @@ namespace mojo { template <> -struct EnumTraits { - using TextSuggestionMode = ::chromeos::ime::TextSuggestionMode; - using SuggestionMode = ::chromeos::ime::mojom::SuggestionMode; +struct EnumTraits { + using TextSuggestionMode = ::ash::ime::TextSuggestionMode; + using SuggestionMode = ::ash::ime::mojom::SuggestionMode; static SuggestionMode ToMojom(TextSuggestionMode mode); static bool FromMojom(SuggestionMode input, TextSuggestionMode* output); }; template <> -struct EnumTraits { - using TextSuggestionType = ::chromeos::ime::TextSuggestionType; - using SuggestionType = ::chromeos::ime::mojom::SuggestionType; +struct EnumTraits { + using TextSuggestionType = ::ash::ime::TextSuggestionType; + using SuggestionType = ::ash::ime::mojom::SuggestionType; static SuggestionType ToMojom(TextSuggestionType type); static bool FromMojom(SuggestionType input, TextSuggestionType* output); }; template <> -struct StructTraits { +struct StructTraits { using SuggestionCandidateDataView = - ::chromeos::ime::mojom::SuggestionCandidateDataView; - using TextSuggestion = ::chromeos::ime::TextSuggestion; - using TextSuggestionMode = ::chromeos::ime::TextSuggestionMode; - using TextSuggestionType = ::chromeos::ime::TextSuggestionType; + ::ash::ime::mojom::SuggestionCandidateDataView; + using TextSuggestion = ::ash::ime::TextSuggestion; + using TextSuggestionMode = ::ash::ime::TextSuggestionMode; + using TextSuggestionType = ::ash::ime::TextSuggestionType; static TextSuggestionMode mode(const TextSuggestion& suggestion) { return suggestion.mode; @@ -56,11 +56,11 @@ struct StructTraits -struct StructTraits { +struct StructTraits { using CompletionCandidateDataView = - ::chromeos::ime::mojom::CompletionCandidateDataView; - using TextCompletionCandidate = ::chromeos::ime::TextCompletionCandidate; + ::ash::ime::mojom::CompletionCandidateDataView; + using TextCompletionCandidate = ::ash::ime::TextCompletionCandidate; static const std::string& text(const TextCompletionCandidate& candidate) { return candidate.text; @@ -76,11 +76,10 @@ struct StructTraits -struct StructTraits { +struct StructTraits { static uint32_t start(const gfx::Range& r) { return r.start(); } static uint32_t end(const gfx::Range& r) { return r.end(); } - static bool Read(chromeos::ime::mojom::TextRangeDataView data, - gfx::Range* out) { + static bool Read(ash::ime::mojom::TextRangeDataView data, gfx::Range* out) { out->set_start(data.start()); out->set_end(data.end()); return true; diff --git a/ash/services/ime/public/proto/messages.proto b/ash/services/ime/public/proto/messages.proto index f26c9be2d05c47..c4dc1d71892e88 100644 --- a/ash/services/ime/public/proto/messages.proto +++ b/ash/services/ime/public/proto/messages.proto @@ -8,7 +8,7 @@ syntax = "proto2"; -package chromeos.ime; +package ash.ime; // The base message type for all communication between the IME service and the // shared library. The IME service and the shared library uses both a public and diff --git a/ash/services/ime/rule_based_engine.cc b/ash/services/ime/rule_based_engine.cc index 846894b95c1d9f..5eeed770f40cac 100644 --- a/ash/services/ime/rule_based_engine.cc +++ b/ash/services/ime/rule_based_engine.cc @@ -10,7 +10,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" -namespace chromeos { +namespace ash { namespace ime { namespace { @@ -167,4 +167,4 @@ RuleBasedEngine::RuleBasedEngine( } } // namespace ime -} // namespace chromeos +} // namespace ash diff --git a/ash/services/ime/rule_based_engine.h b/ash/services/ime/rule_based_engine.h index 50d90f1f505052..69b5ddf43bd6ba 100644 --- a/ash/services/ime/rule_based_engine.h +++ b/ash/services/ime/rule_based_engine.h @@ -15,7 +15,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" -namespace chromeos { +namespace ash { namespace ime { // Handles rule-based input methods such as Arabic and Vietnamese. @@ -68,6 +68,6 @@ class RuleBasedEngine : public InputEngine, public mojom::InputMethod { }; } // namespace ime -} // namespace chromeos +} // namespace ash #endif // ASH_SERVICES_IME_RULE_BASED_ENGINE_H_ diff --git a/chrome/browser/ash/input_method/assistive_suggester.cc b/chrome/browser/ash/input_method/assistive_suggester.cc index fbe0427c35fc3e..f0efa979d24921 100644 --- a/chrome/browser/ash/input_method/assistive_suggester.cc +++ b/chrome/browser/ash/input_method/assistive_suggester.cc @@ -29,9 +29,9 @@ namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; const char kMaxTextBeforeCursorLength = 50; diff --git a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc index f3e99430dab52e..c65f3f70b8f42a 100644 --- a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc @@ -22,9 +22,9 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; } // namespace diff --git a/chrome/browser/ash/input_method/emoji_suggester.cc b/chrome/browser/ash/input_method/emoji_suggester.cc index 630d38c11df784..6aa5194b6e05b9 100644 --- a/chrome/browser/ash/input_method/emoji_suggester.cc +++ b/chrome/browser/ash/input_method/emoji_suggester.cc @@ -33,9 +33,9 @@ namespace input_method { namespace { -using TextSuggestion = ::chromeos::ime::TextSuggestion; -using TextSuggestionMode = ::chromeos::ime::TextSuggestionMode; -using TextSuggestionType = ::chromeos::ime::TextSuggestionType; +using TextSuggestion = ::ash::ime::TextSuggestion; +using TextSuggestionMode = ::ash::ime::TextSuggestionMode; +using TextSuggestionType = ::ash::ime::TextSuggestionType; constexpr char kEmojiSuggesterShowSettingCount[] = "emoji_suggester.show_setting_count"; diff --git a/chrome/browser/ash/input_method/emoji_suggester_unittest.cc b/chrome/browser/ash/input_method/emoji_suggester_unittest.cc index 3524607c997e84..7268590c6cea15 100644 --- a/chrome/browser/ash/input_method/emoji_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/emoji_suggester_unittest.cc @@ -18,9 +18,9 @@ namespace ash { namespace input_method { namespace { -using TextSuggestion = ::chromeos::ime::TextSuggestion; -using TextSuggestionMode = ::chromeos::ime::TextSuggestionMode; -using TextSuggestionType = ::chromeos::ime::TextSuggestionType; +using TextSuggestion = ::ash::ime::TextSuggestion; +using TextSuggestionMode = ::ash::ime::TextSuggestionMode; +using TextSuggestionType = ::ash::ime::TextSuggestionType; } // namespace diff --git a/chrome/browser/ash/input_method/ime_service_connector.cc b/chrome/browser/ash/input_method/ime_service_connector.cc index fb1f6b61b22a78..3e2b85503f8909 100644 --- a/chrome/browser/ash/input_method/ime_service_connector.cc +++ b/chrome/browser/ash/input_method/ime_service_connector.cc @@ -49,8 +49,8 @@ bool IsDownloadPathValid(const base::FilePath& file_path) { return false; // Target path must be restricted in the provided path. - base::FilePath parent(chromeos::ime::kInputMethodsDirName); - parent = parent.Append(chromeos::ime::kLanguageDataDirName); + base::FilePath parent(ime::kInputMethodsDirName); + parent = parent.Append(ime::kLanguageDataDirName); return parent.IsParent(file_path); } @@ -58,7 +58,7 @@ bool IsDownloadURLValid(const GURL& url) { // TODO(https://crbug.com/837156): Allowlist all URLs instead of some general // checks below. return url.SchemeIs(url::kHttpsScheme) && - url.DomainIs(chromeos::ime::kGoogleKeyboardDownloadDomain); + url.DomainIs(ime::kGoogleKeyboardDownloadDomain); } } // namespace @@ -107,7 +107,7 @@ void ImeServiceConnector::DownloadImeFileTo( } void ImeServiceConnector::SetupImeService( - mojo::PendingReceiver receiver) { + mojo::PendingReceiver receiver) { if (!remote_service_) { content::ServiceProcessHost::Launch( remote_service_.BindNewPipeAndPassReceiver(), diff --git a/chrome/browser/ash/input_method/ime_service_connector.h b/chrome/browser/ash/input_method/ime_service_connector.h index bb7d216003f9ff..98cd8180fd03e6 100644 --- a/chrome/browser/ash/input_method/ime_service_connector.h +++ b/chrome/browser/ash/input_method/ime_service_connector.h @@ -23,8 +23,7 @@ namespace ash { namespace input_method { // The connector of an ImeService which runs in its own process. -class ImeServiceConnector - : public chromeos::ime::mojom::PlatformAccessProvider { +class ImeServiceConnector : public ime::mojom::PlatformAccessProvider { public: explicit ImeServiceConnector(Profile* profile); @@ -40,7 +39,7 @@ class ImeServiceConnector // Launch an out-of-process IME service and grant necessary Platform access. void SetupImeService( - mojo::PendingReceiver receiver); + mojo::PendingReceiver receiver); void OnFileDownloadComplete(DownloadImeFileToCallback client_callback, base::FilePath path); @@ -54,9 +53,9 @@ class ImeServiceConnector std::unique_ptr url_loader_; // Persistent connection to the IME service process. - mojo::Remote remote_service_; - mojo::Receiver - platform_access_receiver_{this}; + mojo::Remote remote_service_; + mojo::Receiver platform_access_receiver_{ + this}; }; } // namespace input_method diff --git a/chrome/browser/ash/input_method/input_method_manager_impl.cc b/chrome/browser/ash/input_method/input_method_manager_impl.cc index 306676649bf022..dcddd7ea9625c7 100644 --- a/chrome/browser/ash/input_method/input_method_manager_impl.cc +++ b/chrome/browser/ash/input_method/input_method_manager_impl.cc @@ -1169,7 +1169,7 @@ void InputMethodManagerImpl::ActivateInputMethodMenuItem( } void InputMethodManagerImpl::ConnectInputEngineManager( - mojo::PendingReceiver receiver) { + mojo::PendingReceiver receiver) { DCHECK(state_); ImeServiceConnectorMap::iterator iter = ime_service_connectors_.find(state_->GetProfile()); diff --git a/chrome/browser/ash/input_method/input_method_manager_impl.h b/chrome/browser/ash/input_method/input_method_manager_impl.h index 17864496f2e2a1..85557baca43ade 100644 --- a/chrome/browser/ash/input_method/input_method_manager_impl.h +++ b/chrome/browser/ash/input_method/input_method_manager_impl.h @@ -214,8 +214,7 @@ class InputMethodManagerImpl : public InputMethodManager, InputMethodManager::ImeMenuObserver* observer) override; void ActivateInputMethodMenuItem(const std::string& key) override; void ConnectInputEngineManager( - mojo::PendingReceiver receiver) - override; + mojo::PendingReceiver receiver) override; bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override; bool IsAltGrUsedByCurrentInputMethod() const override; bool ArePositionalShortcutsUsedByCurrentInputMethod() const override; diff --git a/chrome/browser/ash/input_method/input_method_settings.cc b/chrome/browser/ash/input_method/input_method_settings.cc index ddef63b8cd6622..4454667c4e2024 100644 --- a/chrome/browser/ash/input_method/input_method_settings.cc +++ b/chrome/browser/ash/input_method/input_method_settings.cc @@ -12,7 +12,7 @@ namespace ash { namespace input_method { namespace { -namespace mojom = chromeos::ime::mojom; +namespace mojom = ::ash::ime::mojom; // The values here should be kept in sync with // chrome/browser/resources/settings/chromeos/os_languages_page/input_method_util.js diff --git a/chrome/browser/ash/input_method/input_method_settings.h b/chrome/browser/ash/input_method/input_method_settings.h index e5780a0b29362c..78d18863baf15f 100644 --- a/chrome/browser/ash/input_method/input_method_settings.h +++ b/chrome/browser/ash/input_method/input_method_settings.h @@ -11,7 +11,7 @@ namespace ash { namespace input_method { -chromeos::ime::mojom::InputMethodSettingsPtr CreateSettingsFromPrefs( +ime::mojom::InputMethodSettingsPtr CreateSettingsFromPrefs( const PrefService& prefs, const std::string& engine_id); diff --git a/chrome/browser/ash/input_method/input_method_settings_unittest.cc b/chrome/browser/ash/input_method/input_method_settings_unittest.cc index 246ad1ac4168b8..da63a8dd90eb85 100644 --- a/chrome/browser/ash/input_method/input_method_settings_unittest.cc +++ b/chrome/browser/ash/input_method/input_method_settings_unittest.cc @@ -19,7 +19,7 @@ namespace ash { namespace input_method { namespace { -namespace mojom = chromeos::ime::mojom; +namespace mojom = ::ash::ime::mojom; constexpr char kUsEnglishEngineId[] = "xkb:us::eng"; constexpr char kKoreanEngineId[] = "ko-t-i0-und"; diff --git a/chrome/browser/ash/input_method/multi_word_suggester.cc b/chrome/browser/ash/input_method/multi_word_suggester.cc index d8d30ffd14e1a5..011b7cc911ca65 100644 --- a/chrome/browser/ash/input_method/multi_word_suggester.cc +++ b/chrome/browser/ash/input_method/multi_word_suggester.cc @@ -16,9 +16,9 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; constexpr char16_t kSuggestionShownMessage[] = u"predictive writing candidate shown, press tab to accept"; diff --git a/chrome/browser/ash/input_method/multi_word_suggester_unittest.cc b/chrome/browser/ash/input_method/multi_word_suggester_unittest.cc index 43b2630261bb26..66078f9892a65c 100644 --- a/chrome/browser/ash/input_method/multi_word_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/multi_word_suggester_unittest.cc @@ -17,9 +17,9 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; constexpr int kFocusedContextId = 5; diff --git a/chrome/browser/ash/input_method/native_input_method_engine.cc b/chrome/browser/ash/input_method/native_input_method_engine.cc index d139b4107ab8d2..0380966cc7e359 100644 --- a/chrome/browser/ash/input_method/native_input_method_engine.cc +++ b/chrome/browser/ash/input_method/native_input_method_engine.cc @@ -40,7 +40,7 @@ namespace input_method { namespace { -namespace mojom = ::chromeos::ime::mojom; +namespace mojom = ::ash::ime::mojom; // Returns the current input context. This may change during the session, even // if the IME engine does not change. @@ -950,7 +950,7 @@ void NativeInputMethodEngine::ImeObserver::DisplaySuggestions( } void NativeInputMethodEngine::ImeObserver::UpdateCandidatesWindow( - chromeos::ime::mojom::CandidatesWindowPtr window) { + mojom::CandidatesWindowPtr window) { if (!GetCandidateWindowHandler()) { return; } diff --git a/chrome/browser/ash/input_method/native_input_method_engine.h b/chrome/browser/ash/input_method/native_input_method_engine.h index f3fc712cc2c9a8..a95e6838903919 100644 --- a/chrome/browser/ash/input_method/native_input_method_engine.h +++ b/chrome/browser/ash/input_method/native_input_method_engine.h @@ -84,7 +84,7 @@ class NativeInputMethodEngine private: class ImeObserver : public InputMethodEngineBase::Observer, - public chromeos::ime::mojom::InputMethodHost { + public ime::mojom::InputMethodHost { public: // |ime_base_observer| is to forward events to extension during this // migration. It will be removed when the official extension is completely @@ -132,34 +132,32 @@ class NativeInputMethodEngine void OnInputMethodOptionsChanged(const std::string& engine_id) override; // ime::mojom::InputMethodHost: - void CommitText(const std::u16string& text, - chromeos::ime::mojom::CommitTextCursorBehavior - cursor_behavior) override; + void CommitText( + const std::u16string& text, + ime::mojom::CommitTextCursorBehavior cursor_behavior) override; void SetComposition( const std::u16string& text, - std::vector spans) override; + std::vector spans) override; void SetCompositionRange(uint32_t start_index, uint32_t end_index) override; void FinishComposition() override; void DeleteSurroundingText(uint32_t num_before_cursor, uint32_t num_after_cursor) override; void HandleAutocorrect( - chromeos::ime::mojom::AutocorrectSpanPtr autocorrect_span) override; - void RequestSuggestions(chromeos::ime::mojom::SuggestionsRequestPtr request, + ime::mojom::AutocorrectSpanPtr autocorrect_span) override; + void RequestSuggestions(ime::mojom::SuggestionsRequestPtr request, RequestSuggestionsCallback callback) override; void DisplaySuggestions( const std::vector& suggestions) override; void UpdateCandidatesWindow( - chromeos::ime::mojom::CandidatesWindowPtr window) override; - void RecordUkm(chromeos::ime::mojom::UkmEntryPtr entry) override; - void ReportKoreanAction(chromeos::ime::mojom::KoreanAction action) override; - void ReportKoreanSettings( - chromeos::ime::mojom::KoreanSettingsPtr settings) override; + ime::mojom::CandidatesWindowPtr window) override; + void RecordUkm(ime::mojom::UkmEntryPtr entry) override; + void ReportKoreanAction(ime::mojom::KoreanAction action) override; + void ReportKoreanSettings(ime::mojom::KoreanSettingsPtr settings) override; // Called when suggestions are collected from the system via // suggestions_collector_. - void OnSuggestionsGathered( - RequestSuggestionsCallback request_callback, - chromeos::ime::mojom::SuggestionsResponsePtr response); + void OnSuggestionsGathered(RequestSuggestionsCallback request_callback, + ime::mojom::SuggestionsResponsePtr response); // Flush all relevant Mojo pipes. void FlushForTesting(); @@ -183,9 +181,9 @@ class NativeInputMethodEngine PrefService* prefs_ = nullptr; std::unique_ptr ime_base_observer_; - mojo::Remote remote_manager_; - mojo::Remote input_method_; - mojo::Receiver host_receiver_{this}; + mojo::Remote remote_manager_; + mojo::Remote input_method_; + mojo::Receiver host_receiver_{this}; std::unique_ptr assistive_suggester_; std::unique_ptr autocorrect_manager_; diff --git a/chrome/browser/ash/input_method/native_input_method_engine_unittest.cc b/chrome/browser/ash/input_method/native_input_method_engine_unittest.cc index 0f0e1c086f876a..de714e24d1af49 100644 --- a/chrome/browser/ash/input_method/native_input_method_engine_unittest.cc +++ b/chrome/browser/ash/input_method/native_input_method_engine_unittest.cc @@ -38,9 +38,6 @@ namespace ash { namespace input_method { namespace { -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ime = ::chromeos::ime; - MATCHER_P(MojoEq, value, "") { return *arg == value; } diff --git a/chrome/browser/ash/input_method/personal_info_suggester.cc b/chrome/browser/ash/input_method/personal_info_suggester.cc index 781335631a1d19..94e5b707797856 100644 --- a/chrome/browser/ash/input_method/personal_info_suggester.cc +++ b/chrome/browser/ash/input_method/personal_info_suggester.cc @@ -33,9 +33,9 @@ namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; const size_t kMaxConfirmedTextLength = 10; constexpr size_t kMaxTextBeforeCursorLength = 50; diff --git a/chrome/browser/ash/input_method/personal_info_suggester_unittest.cc b/chrome/browser/ash/input_method/personal_info_suggester_unittest.cc index 7f289a2447cf3f..a7de9ac3f89c93 100644 --- a/chrome/browser/ash/input_method/personal_info_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/personal_info_suggester_unittest.cc @@ -28,9 +28,9 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; // TODO(crbug/1201529): Update this unit test to use `FakeSuggestionHandler` // instead. diff --git a/chrome/browser/ash/input_method/suggestions_collector.cc b/chrome/browser/ash/input_method/suggestions_collector.cc index 608d7d0794c83b..1d9ec9484ca8b4 100644 --- a/chrome/browser/ash/input_method/suggestions_collector.cc +++ b/chrome/browser/ash/input_method/suggestions_collector.cc @@ -12,8 +12,8 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; std::vector CombineResults( const std::vector& first, @@ -36,13 +36,13 @@ SuggestionsCollector::SuggestionsCollector( SuggestionsCollector::~SuggestionsCollector() = default; void SuggestionsCollector::GatherSuggestions( - chromeos::ime::mojom::SuggestionsRequestPtr request, + ime::mojom::SuggestionsRequestPtr request, GatherSuggestionsCallback callback) { std::vector assistive_suggestions = assistive_suggester_->GetSuggestions(); if (!suggestions_service_client_->IsAvailable()) { - auto response = chromeos::ime::mojom::SuggestionsResponse::New( + auto response = ime::mojom::SuggestionsResponse::New( /*candidates=*/assistive_suggestions); std::move(callback).Run(std::move(response)); return; @@ -59,7 +59,7 @@ void SuggestionsCollector::OnSuggestionsGathered( GatherSuggestionsCallback callback, const std::vector& assistive_suggestions, const std::vector& system_suggestions) { - auto response = chromeos::ime::mojom::SuggestionsResponse::New( + auto response = ime::mojom::SuggestionsResponse::New( /*candidates=*/CombineResults(assistive_suggestions, system_suggestions)); std::move(callback).Run(std::move(response)); } diff --git a/chrome/browser/ash/input_method/suggestions_collector.h b/chrome/browser/ash/input_method/suggestions_collector.h index 9057be70ae37f0..a0586c12f9339a 100644 --- a/chrome/browser/ash/input_method/suggestions_collector.h +++ b/chrome/browser/ash/input_method/suggestions_collector.h @@ -27,10 +27,10 @@ class SuggestionsCollector { ~SuggestionsCollector(); using GatherSuggestionsCallback = - base::OnceCallback; + base::OnceCallback; // Collects all suggestions from the system. - void GatherSuggestions(chromeos::ime::mojom::SuggestionsRequestPtr request, + void GatherSuggestions(ime::mojom::SuggestionsRequestPtr request, GatherSuggestionsCallback callback); private: diff --git a/chrome/browser/ash/input_method/suggestions_collector_unittest.cc b/chrome/browser/ash/input_method/suggestions_collector_unittest.cc index 1953f80477542a..96f6eef946b15a 100644 --- a/chrome/browser/ash/input_method/suggestions_collector_unittest.cc +++ b/chrome/browser/ash/input_method/suggestions_collector_unittest.cc @@ -17,10 +17,10 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextCompletionCandidate; -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextCompletionCandidate; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; class FakeAssistiveSuggester : public SuggestionsSource { public: @@ -87,8 +87,7 @@ class SuggestionsCollectorTest : public ::testing::Test { return personal_info_address_result_; } - void OnSuggestionsReturned( - chromeos::ime::mojom::SuggestionsResponsePtr response) { + void OnSuggestionsReturned(ime::mojom::SuggestionsResponsePtr response) { suggestions_returned_ = response->candidates; } @@ -112,7 +111,7 @@ TEST_F(SuggestionsCollectorTest, ReturnsResultsFromAssistiveSuggester) { SuggestionsCollector collector(&suggester, std::move(requestor)); collector.GatherSuggestions( - chromeos::ime::mojom::SuggestionsRequest::New(), + ime::mojom::SuggestionsRequest::New(), base::BindOnce(&SuggestionsCollectorTest::OnSuggestionsReturned, base::Unretained(this))); @@ -129,7 +128,7 @@ TEST_F(SuggestionsCollectorTest, ReturnsResultsFromSuggestionsRequestor) { SuggestionsCollector collector(&suggester, std::move(requestor)); collector.GatherSuggestions( - chromeos::ime::mojom::SuggestionsRequest::New(), + ime::mojom::SuggestionsRequest::New(), base::BindOnce(&SuggestionsCollectorTest::OnSuggestionsReturned, base::Unretained(this))); @@ -154,7 +153,7 @@ TEST_F(SuggestionsCollectorTest, ReturnsCombinedResultsIfAvailable) { }; collector.GatherSuggestions( - chromeos::ime::mojom::SuggestionsRequest::New(), + ime::mojom::SuggestionsRequest::New(), base::BindOnce(&SuggestionsCollectorTest::OnSuggestionsReturned, base::Unretained(this))); @@ -180,7 +179,7 @@ TEST_F(SuggestionsCollectorTest, }; collector.GatherSuggestions( - chromeos::ime::mojom::SuggestionsRequest::New(), + ime::mojom::SuggestionsRequest::New(), base::BindOnce(&SuggestionsCollectorTest::OnSuggestionsReturned, base::Unretained(this))); diff --git a/chrome/browser/ash/input_method/suggestions_service_client.cc b/chrome/browser/ash/input_method/suggestions_service_client.cc index 08fea08a643ab8..037a069a58f377 100644 --- a/chrome/browser/ash/input_method/suggestions_service_client.cc +++ b/chrome/browser/ash/input_method/suggestions_service_client.cc @@ -15,9 +15,9 @@ namespace ash { namespace input_method { namespace { -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; using ::chromeos::machine_learning::mojom::MultiWordExperimentGroup; using ::chromeos::machine_learning::mojom::NextWordCompletionCandidate; using ::chromeos::machine_learning::mojom::TextSuggesterQuery; diff --git a/chrome/browser/ash/input_method/suggestions_service_client_unittest.cc b/chrome/browser/ash/input_method/suggestions_service_client_unittest.cc index 1aac37adc963db..0ba616376acc48 100644 --- a/chrome/browser/ash/input_method/suggestions_service_client_unittest.cc +++ b/chrome/browser/ash/input_method/suggestions_service_client_unittest.cc @@ -18,10 +18,10 @@ namespace { namespace machine_learning = ::chromeos::machine_learning; -using ::chromeos::ime::TextCompletionCandidate; -using ::chromeos::ime::TextSuggestion; -using ::chromeos::ime::TextSuggestionMode; -using ::chromeos::ime::TextSuggestionType; +using ::ash::ime::TextCompletionCandidate; +using ::ash::ime::TextSuggestion; +using ::ash::ime::TextSuggestionMode; +using ::ash::ime::TextSuggestionType; class SuggestionsServiceClientTest : public testing::Test { public: diff --git a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc index 2223d2e7ca6bda..118b8fd2b4ec3a 100644 --- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc +++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc @@ -174,16 +174,15 @@ void ChromeExtensionsDispatcherDelegate::PopulateSourceMap( IDR_TERMINAL_PRIVATE_CUSTOM_BINDINGS_JS); // IME service on Chrome OS. - source_map->RegisterSource("chromeos.ime.mojom.ime_service.mojom", + source_map->RegisterSource("ash.ime.mojom.ime_service.mojom", IDR_IME_SERVICE_MOJOM_JS); - source_map->RegisterSource("chromeos.ime.mojom.input_engine.mojom", + source_map->RegisterSource("ash.ime.mojom.input_engine.mojom", IDR_IME_SERVICE_INPUT_ENGINE_MOJOM_JS); - source_map->RegisterSource("chromeos.ime.mojom.input_method.mojom", + source_map->RegisterSource("ash.ime.mojom.input_method.mojom", IDR_IME_SERVICE_INPUT_METHOD_MOJOM_JS); - source_map->RegisterSource("chromeos.ime.mojom.input_method_host.mojom", + source_map->RegisterSource("ash.ime.mojom.input_method_host.mojom", IDR_IME_SERVICE_INPUT_METHOD_HOST_MOJOM_JS); - source_map->RegisterSource("chromeos.ime.service", - IDR_IME_SERVICE_BINDINGS_JS); + source_map->RegisterSource("ash.ime.service", IDR_IME_SERVICE_BINDINGS_JS); source_map->RegisterSource("chromeos.tts.mojom.google_tts_stream.mojom", IDR_GOOGLE_TTS_STREAM_MOJOM_JS); diff --git a/chrome/renderer/resources/extensions/chromeos_ime_service_bindings.js b/chrome/renderer/resources/extensions/chromeos_ime_service_bindings.js index 79f762771e80a7..88937c97844b25 100644 --- a/chrome/renderer/resources/extensions/chromeos_ime_service_bindings.js +++ b/chrome/renderer/resources/extensions/chromeos_ime_service_bindings.js @@ -9,10 +9,10 @@ if ((typeof mojo === 'undefined') || !mojo.bindingsLibraryInitialized) { } mojo.config.autoLoadMojomDeps = false; -loadScript('chromeos.ime.mojom.ime_service.mojom'); -loadScript('chromeos.ime.mojom.input_engine.mojom'); -loadScript('chromeos.ime.mojom.input_method.mojom'); -loadScript('chromeos.ime.mojom.input_method_host.mojom'); +loadScript('ash.ime.mojom.ime_service.mojom'); +loadScript('ash.ime.mojom.input_engine.mojom'); +loadScript('ash.ime.mojom.input_method.mojom'); +loadScript('ash.ime.mojom.input_method_host.mojom'); /** * Empty result to keep Mojo pipe from disconnection. @@ -31,7 +31,7 @@ var IME_CHANNEL_EMPTY_EXTRA = new Uint8Array(0); /* * Represents the js-side of the InputChannel. * Routes calls from IME service to the IME extension. - * @implements {chromeos.ime.mojom.InputChannel} + * @implements {ash.ime.mojom.InputChannel} */ class ImeExtensionChannel { constructor() { @@ -39,11 +39,11 @@ class ImeExtensionChannel { * @private @const * @type {!mojo.Binding} * */ - this.binding_ = new mojo.Binding(chromeos.ime.mojom.InputChannel, this); + this.binding_ = new mojo.Binding(ash.ime.mojom.InputChannel, this); /** * @private - * @type {chromeos.ime.mojom.InputChannelPtr} + * @type {ash.ime.mojom.InputChannelPtr} */ this.channelPtr_ = undefined; @@ -68,7 +68,7 @@ class ImeExtensionChannel { * Get a cached bound InterfacePtr for this InputChannel impl. * Create one the ptr if it's not bound yet. * - * @return {!chromeos.ime.mojom.InputChannelPtr}. + * @return {!ash.ime.mojom.InputChannelPtr}. */ getChannelPtr() { return this.binding_.createInterfacePtrAndBind() @@ -142,13 +142,13 @@ class ImeExtensionChannel { * The main entry point to the IME Mojo service. */ class ImeService { - /** @param {!chromeos.ime.mojom.InputEngineManagerPtr} */ + /** @param {!ash.ime.mojom.InputEngineManagerPtr} */ constructor(manager) { /** * The IME Mojo service. Allows extension code to fetch an engine instance * implemented in the connected IME service. * @private - * @type {!chromeos.ime.mojom.InputEngineManagerPtr} + * @type {!ash.ime.mojom.InputEngineManagerPtr} */ this.manager_ = manager; @@ -165,7 +165,7 @@ class ImeService { * An active IME Engine proxy. Allows extension code to make calls on the * connected InputEngine that resides in the IME service. * @private - * @type {!chromeos.ime.mojom.InputChannelPtr} + * @type {!ash.ime.mojom.InputChannelPtr} */ this.activeEngine_ = null; @@ -195,7 +195,7 @@ class ImeService { } /** - * @return {?chromeos.ime.mojom.InputChannelPtr} A bound IME engine instance + * @return {?ash.ime.mojom.InputChannelPtr} A bound IME engine instance * or null if no IME Engine is bound. */ getActiveEngine() { @@ -244,7 +244,7 @@ class ImeService { // TODO(crbug.com/837156): Try to reuse the current engine if possible. // Disconnect the current active engine and make a new one. this.deactivateIME(); - this.activeEngine_ = new chromeos.ime.mojom.InputChannelPtr; + this.activeEngine_ = new ash.ime.mojom.InputChannelPtr; // Null value will cause a disconnection on the Mojo pipe. extra = extra ? extra : IME_CHANNEL_EMPTY_EXTRA; @@ -282,8 +282,8 @@ class ImeService { } (function() { - let ptr = new chromeos.ime.mojom.InputEngineManagerPtr; + let ptr = new ash.ime.mojom.InputEngineManagerPtr; Mojo.bindInterface( - chromeos.ime.mojom.InputEngineManager.name, mojo.makeRequest(ptr).handle); + ash.ime.mojom.InputEngineManager.name, mojo.makeRequest(ptr).handle); exports.$set('returnValue', new ImeService(ptr)); })(); diff --git a/chrome/utility/services.cc b/chrome/utility/services.cc index 9cd2994074f8c5..d4d8eaadc1675a 100644 --- a/chrome/utility/services.cc +++ b/chrome/utility/services.cc @@ -283,8 +283,8 @@ auto RunPrintCompositor( #if BUILDFLAG(IS_CHROMEOS_ASH) auto RunImeService( - mojo::PendingReceiver receiver) { - return std::make_unique(std::move(receiver)); + mojo::PendingReceiver receiver) { + return std::make_unique(std::move(receiver)); } auto RunRecordingService( diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc index c40836cbc1140b..25746ad4125fb5 100644 --- a/content/utility/utility_main.cc +++ b/content/utility/utility_main.cc @@ -140,7 +140,7 @@ int UtilityMain(MainFunctionParams parameters) { break; #if BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kIme: - pre_sandbox_hook = base::BindOnce(&chromeos::ime::ImePreSandboxHook); + pre_sandbox_hook = base::BindOnce(&ash::ime::ImePreSandboxHook); break; case sandbox::mojom::Sandbox::kTts: pre_sandbox_hook = base::BindOnce(&chromeos::tts::TtsPreSandboxHook); diff --git a/services/tracing/public/cpp/perfetto/trace_string_lookup.cc b/services/tracing/public/cpp/perfetto/trace_string_lookup.cc index 70d92a8602fa65..567ef163790381 100644 --- a/services/tracing/public/cpp/perfetto/trace_string_lookup.cc +++ b/services/tracing/public/cpp/perfetto/trace_string_lookup.cc @@ -81,7 +81,7 @@ constexpr ProcessType kProcessTypes[] = { ChromeProcessDescriptor::PROCESS_SERVICE_QRCODEGENERATOR}, {"Service: chrome.mojom.ProfileImport", ChromeProcessDescriptor::PROCESS_SERVICE_PROFILEIMPORT}, - {"Service: chromeos.ime.mojom.ImeService", + {"Service: ash.ime.mojom.ImeService", ChromeProcessDescriptor::PROCESS_SERVICE_IME}, {"Service: recording.mojom.RecordingService", ChromeProcessDescriptor::PROCESS_SERVICE_RECORDING}, diff --git a/ui/base/ime/ash/input_method_manager.h b/ui/base/ime/ash/input_method_manager.h index 8ef1c1b542089a..64c6954f136f2e 100644 --- a/ui/base/ime/ash/input_method_manager.h +++ b/ui/base/ime/ash/input_method_manager.h @@ -305,8 +305,7 @@ class COMPONENT_EXPORT(UI_BASE_IME_ASH) InputMethodManager { // Connects a receiver to the InputEngineManager instance. virtual void ConnectInputEngineManager( - mojo::PendingReceiver - receiver) = 0; + mojo::PendingReceiver receiver) = 0; virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const = 0; diff --git a/ui/base/ime/ash/input_method_ukm.cc b/ui/base/ime/ash/input_method_ukm.cc index beeea5523c94e0..a203e4026daef5 100644 --- a/ui/base/ime/ash/input_method_ukm.cc +++ b/ui/base/ime/ash/input_method_ukm.cc @@ -11,14 +11,14 @@ namespace ui { void RecordUkmNonCompliantApi( ukm::SourceId source, - const chromeos::ime::mojom::InputMethodApiOperation operation) { + const ash::ime::mojom::InputMethodApiOperation operation) { if (source == ukm::kInvalidSourceId || - operation == chromeos::ime::mojom::InputMethodApiOperation::kUnknown) { + operation == ash::ime::mojom::InputMethodApiOperation::kUnknown) { return; } // After this metric was added, a default value of zero was added to - // chromeos.ime.mojom.InputMethodApiOperation, which shifted all the values by + // ash.ime.mojom.InputMethodApiOperation, which shifted all the values by // one. So subtract one to ensure the metric is still correct. ukm::builders::InputMethod_NonCompliantApi(source) .SetNonCompliantOperation(static_cast(operation) - 1) diff --git a/ui/base/ime/ash/input_method_ukm.h b/ui/base/ime/ash/input_method_ukm.h index df5784717ab792..87e759c3b27804 100644 --- a/ui/base/ime/ash/input_method_ukm.h +++ b/ui/base/ime/ash/input_method_ukm.h @@ -17,7 +17,7 @@ namespace ui { COMPONENT_EXPORT(UI_BASE_IME_ASH) void RecordUkmNonCompliantApi( ukm::SourceId source, - chromeos::ime::mojom::InputMethodApiOperation operation); + ash::ime::mojom::InputMethodApiOperation operation); // Records an event in UKM, under the InputMethod.Assistive.Match metric. // Ignores invalid sources. diff --git a/ui/base/ime/ash/mock_input_method_manager.cc b/ui/base/ime/ash/mock_input_method_manager.cc index e454cf7175b76b..4976cb29efedfe 100644 --- a/ui/base/ime/ash/mock_input_method_manager.cc +++ b/ui/base/ime/ash/mock_input_method_manager.cc @@ -156,7 +156,7 @@ void MockInputMethodManager::ActivateInputMethodMenuItem( const std::string& key) {} void MockInputMethodManager::ConnectInputEngineManager( - mojo::PendingReceiver receiver) {} + mojo::PendingReceiver receiver) {} bool MockInputMethodManager::IsISOLevel5ShiftUsedByCurrentInputMethod() const { return false; diff --git a/ui/base/ime/ash/mock_input_method_manager.h b/ui/base/ime/ash/mock_input_method_manager.h index dc8083cbfdea6d..b93a5da1336ebb 100644 --- a/ui/base/ime/ash/mock_input_method_manager.h +++ b/ui/base/ime/ash/mock_input_method_manager.h @@ -109,8 +109,7 @@ class COMPONENT_EXPORT(UI_BASE_IME_ASH) MockInputMethodManager InputMethodManager::ImeMenuObserver* observer) override; void ActivateInputMethodMenuItem(const std::string& key) override; void ConnectInputEngineManager( - mojo::PendingReceiver receiver) - override; + mojo::PendingReceiver receiver) override; bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override; bool IsAltGrUsedByCurrentInputMethod() const override; bool ArePositionalShortcutsUsedByCurrentInputMethod() const override;