From b7bb5840cba2cd0b5958b737813c7d135da94e76 Mon Sep 17 00:00:00 2001 From: My Nguyen Date: Fri, 5 Jun 2020 03:56:28 +0000 Subject: [PATCH] Move InputMethodEngineBase's namespace to chromeos https://crrev.com/c/2212194 moves InputMethodEngineBase to chromeos/input_method/ making it exclusive to chromeos so the namespace should move as well. Using chromeos::InputMethodEngineBase where possible because I will be move all classes in chromeos/input_method to "chromeos::input_method" if they are not already in it. Also remove "#if defined(OS_CHROMEOS)" in InputMethodEngineBase Change-Id: Ic3ecc32d863d3d141bb6567f858431dc173ed240 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222050 Reviewed-by: Keith Lee Reviewed-by: Darren Shen Reviewed-by: Yuichiro Hanada Commit-Queue: My Nguyen Cr-Commit-Position: refs/heads/master@{#775420} --- .../arc_input_method_manager_service.cc | 8 ++++---- .../input_method_manager/input_connection_impl.cc | 9 ++++----- .../input_connection_impl_unittest.cc | 6 +++--- .../chromeos/extensions/input_method_api.cc | 2 +- .../chromeos/input_method/assistive_suggester.cc | 2 -- .../chromeos/input_method/assistive_suggester.h | 3 +-- .../chromeos/input_method/emoji_suggester.cc | 2 -- .../chromeos/input_method/emoji_suggester.h | 3 +-- .../chromeos/input_method/input_method_engine.cc | 2 -- .../chromeos/input_method/input_method_engine.h | 9 +++------ .../input_method/input_method_engine_base.cc | 4 ++-- .../input_method/input_method_engine_base.h | 9 ++------- .../input_method/input_method_engine_unittest.cc | 14 ++++++-------- .../native_input_method_engine_browsertest.cc | 4 ++-- .../input_method/personal_info_suggester.cc | 2 -- .../input_method/personal_info_suggester.h | 3 +-- .../personal_info_suggester_unittest.cc | 2 +- chrome/browser/chromeos/input_method/suggester.h | 2 +- .../extensions/api/input_ime/input_ime_api.cc | 2 +- .../extensions/api/input_ime/input_ime_api.h | 8 +++++--- .../api/input_ime/input_ime_api_chromeos.cc | 6 +++--- .../api/input_ime/input_ime_api_chromeos.h | 2 +- .../api/input_ime/input_ime_event_router_base.h | 2 +- 23 files changed, 43 insertions(+), 63 deletions(-) diff --git a/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service.cc b/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service.cc index cdd2fd9ac9d4b4..352c6071656ad9 100644 --- a/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service.cc +++ b/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service.cc @@ -132,13 +132,13 @@ class ArcInputMethodManagerService::ArcInputMethodBoundsObserver }; class ArcInputMethodManagerService::InputMethodEngineObserver - : public input_method::InputMethodEngineBase::Observer { + : public chromeos::InputMethodEngineBase::Observer { public: explicit InputMethodEngineObserver(ArcInputMethodManagerService* owner) : owner_(owner) {} ~InputMethodEngineObserver() override = default; - // input_method::InputMethodEngineBase::Observer overrides: + // chromeos::InputMethodEngineBase::Observer overrides: void OnActivate(const std::string& engine_id) override { owner_->is_arc_ime_active_ = true; // TODO(yhanada): Remove this line after we migrate to SPM completely. @@ -151,7 +151,7 @@ class ArcInputMethodManagerService::InputMethodEngineObserver void OnBlur(int context_id) override { owner_->Blur(); } void OnKeyEvent( const std::string& engine_id, - const input_method::InputMethodEngineBase::KeyboardEvent& event, + const chromeos::InputMethodEngineBase::KeyboardEvent& event, ui::IMEEngineHandlerInterface::KeyEventDoneCallback key_data) override { if (event.key_code == ui::VKEY_BROWSER_BACK && owner_->IsVirtualKeyboardShown()) { @@ -184,7 +184,7 @@ class ArcInputMethodManagerService::InputMethodEngineObserver void OnCandidateClicked( const std::string& component_id, int candidate_id, - input_method::InputMethodEngineBase::MouseButtonEvent button) override {} + chromeos::InputMethodEngineBase::MouseButtonEvent button) override {} void OnMenuItemActivated(const std::string& component_id, const std::string& menu_id) override {} void OnScreenProjectionChanged(bool is_projected) override {} diff --git a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc index 993ec6a42152eb..7694d77f58aef3 100644 --- a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc +++ b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc @@ -223,7 +223,7 @@ void InputConnectionImpl::SetComposingText( if (!ime_engine_->SetComposition( input_context_id_, base::UTF16ToUTF8(text).c_str(), selection_start, selection_end, new_cursor_pos, - std::vector(), + std::vector(), &error)) { LOG(ERROR) << "SetComposingText failed: pos=" << new_cursor_pos << ", error=\"" << error << "\""; @@ -293,14 +293,13 @@ void InputConnectionImpl::SetCompositionRange( const int before = selection_range.start() - new_composition_range.start(); const int after = new_composition_range.end() - selection_range.end(); - input_method::InputMethodEngineBase::SegmentInfo segment_info; + chromeos::InputMethodEngineBase::SegmentInfo segment_info; segment_info.start = 0; segment_info.end = new_composition_range.length(); - segment_info.style = - input_method::InputMethodEngineBase::SEGMENT_STYLE_UNDERLINE; + segment_info.style = chromeos::InputMethodEngineBase::SEGMENT_STYLE_UNDERLINE; std::string error; - if (!ime_engine_->input_method::InputMethodEngineBase::SetCompositionRange( + if (!ime_engine_->chromeos::InputMethodEngineBase::SetCompositionRange( input_context_id_, before, after, {segment_info}, &error)) { LOG(ERROR) << "SetCompositionRange failed: range=" << new_composition_range.ToString() << ", error=\"" << error diff --git a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl_unittest.cc b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl_unittest.cc index c2f26e4406d653..80445fbcfe5d3e 100644 --- a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl_unittest.cc +++ b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl_unittest.cc @@ -21,7 +21,7 @@ namespace arc { namespace { class DummyInputMethodEngineObserver - : public input_method::InputMethodEngineBase::Observer { + : public chromeos::InputMethodEngineBase::Observer { public: DummyInputMethodEngineObserver() = default; ~DummyInputMethodEngineObserver() override = default; @@ -32,7 +32,7 @@ class DummyInputMethodEngineObserver void OnBlur(int context_id) override {} void OnKeyEvent( const std::string& engine_id, - const input_method::InputMethodEngineBase::KeyboardEvent& event, + const chromeos::InputMethodEngineBase::KeyboardEvent& event, ui::IMEEngineHandlerInterface::KeyEventDoneCallback key_data) override {} void OnReset(const std::string& engine_id) override {} void OnDeactivated(const std::string& engine_id) override {} @@ -48,7 +48,7 @@ class DummyInputMethodEngineObserver void OnCandidateClicked( const std::string& component_id, int candidate_id, - input_method::InputMethodEngineBase::MouseButtonEvent button) override {} + chromeos::InputMethodEngineBase::MouseButtonEvent button) override {} void OnMenuItemActivated(const std::string& component_id, const std::string& menu_id) override {} void OnScreenProjectionChanged(bool is_projected) override {} diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc index 5576c3ba9726f0..5e337a950ce9fd 100644 --- a/chrome/browser/chromeos/extensions/input_method_api.cc +++ b/chrome/browser/chromeos/extensions/input_method_api.cc @@ -73,7 +73,7 @@ namespace SetSelectionRange = namespace OnSettingsChanged = extensions::api::input_method_private::OnSettingsChanged; -using input_method::InputMethodEngineBase; +using chromeos::InputMethodEngineBase; namespace { diff --git a/chrome/browser/chromeos/input_method/assistive_suggester.cc b/chrome/browser/chromeos/input_method/assistive_suggester.cc index e94aad127afabb..247c3347c5c811 100644 --- a/chrome/browser/chromeos/input_method/assistive_suggester.cc +++ b/chrome/browser/chromeos/input_method/assistive_suggester.cc @@ -13,8 +13,6 @@ #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" -using input_method::InputMethodEngineBase; - namespace chromeos { namespace { diff --git a/chrome/browser/chromeos/input_method/assistive_suggester.h b/chrome/browser/chromeos/input_method/assistive_suggester.h index 763e4d5c8de841..cced889badadb4 100644 --- a/chrome/browser/chromeos/input_method/assistive_suggester.h +++ b/chrome/browser/chromeos/input_method/assistive_suggester.h @@ -48,8 +48,7 @@ class AssistiveSuggester { // Called when the user pressed a key. // Returns true if suggester handles the event and it should stop propagate. - bool OnKeyEvent( - const ::input_method::InputMethodEngineBase::KeyboardEvent& event); + bool OnKeyEvent(const InputMethodEngineBase::KeyboardEvent& event); private: // Returns if any suggestion text should be displayed according to the diff --git a/chrome/browser/chromeos/input_method/emoji_suggester.cc b/chrome/browser/chromeos/input_method/emoji_suggester.cc index a732f56972b9b4..0e97967f22fac0 100644 --- a/chrome/browser/chromeos/input_method/emoji_suggester.cc +++ b/chrome/browser/chromeos/input_method/emoji_suggester.cc @@ -14,8 +14,6 @@ #include "base/task/thread_pool.h" #include "chromeos/services/ime/constants.h" -using input_method::InputMethodEngineBase; - namespace chromeos { namespace { diff --git a/chrome/browser/chromeos/input_method/emoji_suggester.h b/chrome/browser/chromeos/input_method/emoji_suggester.h index ca842bcf1b53e4..931f198d67b9ae 100644 --- a/chrome/browser/chromeos/input_method/emoji_suggester.h +++ b/chrome/browser/chromeos/input_method/emoji_suggester.h @@ -25,8 +25,7 @@ class EmojiSuggester : public Suggester { void OnFocus(int context_id) override; void OnBlur() override; SuggestionStatus HandleKeyEvent( - const ::input_method::InputMethodEngineBase::KeyboardEvent& event) - override; + const InputMethodEngineBase::KeyboardEvent& event) override; bool Suggest(const base::string16& text) override; void DismissSuggestion() override; AssistiveType GetProposeActionType() override; diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc index 3135f0a6922847..036377aba1c0cd 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine.cc @@ -37,8 +37,6 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/events/keycodes/dom/keycode_converter.h" -using input_method::InputMethodEngineBase; - namespace chromeos { namespace { diff --git a/chrome/browser/chromeos/input_method/input_method_engine.h b/chrome/browser/chromeos/input_method/input_method_engine.h index cc745d930eb116..91c26a151656cd 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine.h +++ b/chrome/browser/chromeos/input_method/input_method_engine.h @@ -32,14 +32,11 @@ struct InputMethodMenuItem; } // namespace ime } // namespace ui -namespace input_method { -class InputMethodEngineBase; -} // namespace input_method - namespace chromeos { + struct AssistiveWindowProperties; -class InputMethodEngine : public ::input_method::InputMethodEngineBase, +class InputMethodEngine : public InputMethodEngineBase, public SuggestionHandlerInterface { public: enum { @@ -170,7 +167,7 @@ class InputMethodEngine : public ::input_method::InputMethodEngineBase, bool IsValidKeyEvent(const ui::KeyEvent* ui_event) override; private: - // input_method::InputMethodEngineBase: + // InputMethodEngineBase: void UpdateComposition(const ui::CompositionText& composition_text, uint32_t cursor_pos, bool is_visible) override; diff --git a/chrome/browser/chromeos/input_method/input_method_engine_base.cc b/chrome/browser/chromeos/input_method/input_method_engine_base.cc index fd08ec98a7fb36..aefdeb3d818446 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_base.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_base.cc @@ -28,7 +28,7 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/events/keycodes/dom/keycode_converter.h" -namespace input_method { +namespace chromeos { namespace { @@ -587,4 +587,4 @@ void InputMethodEngineBase::ConfirmCompositionText(bool reset_engine, input_context->ConfirmCompositionText(reset_engine, keep_selection); } -} // namespace input_method +} // namespace chromeos diff --git a/chrome/browser/chromeos/input_method/input_method_engine_base.h b/chrome/browser/chromeos/input_method/input_method_engine_base.h index 2c2e1eab993679..ffd4b2670b2e8f 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_base.h +++ b/chrome/browser/chromeos/input_method/input_method_engine_base.h @@ -29,7 +29,7 @@ enum class AssistiveWindowType; } // namespace ime } // namespace ui -namespace input_method { +namespace chromeos { class InputMethodEngineBase : virtual public ui::IMEEngineHandlerInterface { public: @@ -62,13 +62,11 @@ class InputMethodEngineBase : virtual public ui::IMEEngineHandlerInterface { SegmentStyle style; }; -#if defined(OS_CHROMEOS) enum MouseButtonEvent { MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, }; -#endif class Observer { public: @@ -107,8 +105,6 @@ class InputMethodEngineBase : virtual public ui::IMEEngineHandlerInterface { int anchor_pos, int offset_pos) = 0; -#if defined(OS_CHROMEOS) - // Called when an InputContext's properties change while it is focused. virtual void OnInputContextUpdate( const IMEEngineHandlerInterface::InputContext& context) = 0; @@ -129,7 +125,6 @@ class InputMethodEngineBase : virtual public ui::IMEEngineHandlerInterface { const std::string& menu_id) = 0; virtual void OnScreenProjectionChanged(bool is_projected) = 0; -#endif // defined(OS_CHROMEOS) }; InputMethodEngineBase(); @@ -323,6 +318,6 @@ class InputMethodEngineBase : virtual public ui::IMEEngineHandlerInterface { ui::KeyEvent ConvertKeyboardEventToUIKeyEvent(const KeyboardEvent& event); }; -} // namespace input_method +} // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_BASE_H_ diff --git a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc index 180ee95debac44..cbb51e0a1af696 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc @@ -32,8 +32,6 @@ #include "ui/events/types/event_type.h" #include "ui/gfx/geometry/rect.h" -using input_method::InputMethodEngineBase; - namespace chromeos { namespace input_method { @@ -341,7 +339,7 @@ TEST_F(InputMethodEngineTest, TestSetSelectionRange) { CreateEngine(true); const int context = engine_->GetContextIdForTesting(); std::string error; - engine_->::input_method::InputMethodEngineBase::SetSelectionRange( + engine_->chromeos::InputMethodEngineBase::SetSelectionRange( context, /* start */ 0, /* end */ 0, &error); EXPECT_EQ(kErrorNotActive, error); EXPECT_EQ(0, @@ -349,21 +347,21 @@ TEST_F(InputMethodEngineTest, TestSetSelectionRange) { error = ""; engine_->Enable(kTestImeComponentId); - engine_->::input_method::InputMethodEngineBase::SetSelectionRange( + engine_->chromeos::InputMethodEngineBase::SetSelectionRange( context, /* start */ 0, /* end */ 0, &error); EXPECT_EQ("", error); EXPECT_EQ(1, mock_ime_input_context_handler_->set_selection_range_call_count()); error = ""; - engine_->::input_method::InputMethodEngineBase::SetSelectionRange( + engine_->chromeos::InputMethodEngineBase::SetSelectionRange( context, /* start */ -1, /* end */ 0, &error); EXPECT_EQ(base::StringPrintf(kErrorInvalidValue, "start", -1), error); EXPECT_EQ(1, mock_ime_input_context_handler_->set_selection_range_call_count()); error = ""; - engine_->::input_method::InputMethodEngineBase::SetSelectionRange( + engine_->chromeos::InputMethodEngineBase::SetSelectionRange( context, /* start */ 0, /* end */ -1, &error); EXPECT_EQ(base::StringPrintf(kErrorInvalidValue, "end", -1), error); EXPECT_EQ(1, @@ -385,8 +383,8 @@ TEST_F(InputMethodEngineTest, TestDisableAfterSetCompositionRange) { EXPECT_EQ("text", mock_ime_input_context_handler_->last_commit_text()); // Change composition range to include "text". - engine_->::input_method::InputMethodEngineBase::SetCompositionRange( - context, 0, 4, {}, &error); + engine_->chromeos::InputMethodEngineBase::SetCompositionRange(context, 0, 4, + {}, &error); EXPECT_EQ("", error); // Disable to commit diff --git a/chrome/browser/chromeos/input_method/native_input_method_engine_browsertest.cc b/chrome/browser/chromeos/input_method/native_input_method_engine_browsertest.cc index b9775693dbcae3..90de13f68f984b 100644 --- a/chrome/browser/chromeos/input_method/native_input_method_engine_browsertest.cc +++ b/chrome/browser/chromeos/input_method/native_input_method_engine_browsertest.cc @@ -37,9 +37,9 @@ #include "ui/events/keycodes/keyboard_codes.h" #include "ui/events/keycodes/keyboard_codes_posix.h" -namespace { +using chromeos::InputMethodEngineBase; -using input_method::InputMethodEngineBase; +namespace { class TestObserver : public InputMethodEngineBase::Observer { public: diff --git a/chrome/browser/chromeos/input_method/personal_info_suggester.cc b/chrome/browser/chromeos/input_method/personal_info_suggester.cc index 09dc76023b4f32..5c25831c4c8862 100644 --- a/chrome/browser/chromeos/input_method/personal_info_suggester.cc +++ b/chrome/browser/chromeos/input_method/personal_info_suggester.cc @@ -17,8 +17,6 @@ #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" -using input_method::InputMethodEngineBase; - namespace chromeos { namespace { diff --git a/chrome/browser/chromeos/input_method/personal_info_suggester.h b/chrome/browser/chromeos/input_method/personal_info_suggester.h index a6a6a4d73d5eb9..c56ae137367f3a 100644 --- a/chrome/browser/chromeos/input_method/personal_info_suggester.h +++ b/chrome/browser/chromeos/input_method/personal_info_suggester.h @@ -71,8 +71,7 @@ class PersonalInfoSuggester : public Suggester { void OnFocus(int context_id) override; void OnBlur() override; SuggestionStatus HandleKeyEvent( - const ::input_method::InputMethodEngineBase::KeyboardEvent& event) - override; + const InputMethodEngineBase::KeyboardEvent& event) override; bool Suggest(const base::string16& text) override; void DismissSuggestion() override; AssistiveType GetProposeActionType() override; diff --git a/chrome/browser/chromeos/input_method/personal_info_suggester_unittest.cc b/chrome/browser/chromeos/input_method/personal_info_suggester_unittest.cc index dbc7620611ff11..55137d7a752ce5 100644 --- a/chrome/browser/chromeos/input_method/personal_info_suggester_unittest.cc +++ b/chrome/browser/chromeos/input_method/personal_info_suggester_unittest.cc @@ -109,7 +109,7 @@ class PersonalInfoSuggesterTest : public testing::Test { } void SendKeyboardEvent(std::string key) { - ::input_method::InputMethodEngineBase::KeyboardEvent event; + InputMethodEngineBase::KeyboardEvent event; event.key = key; suggester_->HandleKeyEvent(event); } diff --git a/chrome/browser/chromeos/input_method/suggester.h b/chrome/browser/chromeos/input_method/suggester.h index 8b0c588187a6e9..e48dfade25435b 100644 --- a/chrome/browser/chromeos/input_method/suggester.h +++ b/chrome/browser/chromeos/input_method/suggester.h @@ -28,7 +28,7 @@ class Suggester { // Called when suggestion is being shown. // Returns SuggestionStatus as suggester handles the event. virtual SuggestionStatus HandleKeyEvent( - const ::input_method::InputMethodEngineBase::KeyboardEvent& event) = 0; + const InputMethodEngineBase::KeyboardEvent& event) = 0; // Check if suggestion should be displayed according to the surrounding text // information. diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc index e9747f3b9a4cbb..37ea54f92abc55 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc @@ -17,7 +17,7 @@ namespace KeyEventHandled = extensions::api::input_ime::KeyEventHandled; namespace SetComposition = extensions::api::input_ime::SetComposition; namespace CommitText = extensions::api::input_ime::CommitText; namespace SendKeyEvents = extensions::api::input_ime::SendKeyEvents; -using input_method::InputMethodEngineBase; +using chromeos::InputMethodEngineBase; namespace { const char kErrorRouterNotAvailable[] = "The router is not available."; diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h index fdbfe0d3d43d71..934a51efa74441 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api.h +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h @@ -38,19 +38,21 @@ class Profile; namespace ui { class IMEEngineHandlerInterface; -class ImeObserver : public input_method::InputMethodEngineBase::Observer { +using chromeos::InputMethodEngineBase; + +class ImeObserver : public InputMethodEngineBase::Observer { public: ImeObserver(const std::string& extension_id, Profile* profile); ~ImeObserver() override = default; - // input_method::InputMethodEngineBase::Observer overrides. + // InputMethodEngineBase::Observer overrides. void OnActivate(const std::string& component_id) override; void OnFocus(const IMEEngineHandlerInterface::InputContext& context) override; void OnBlur(int context_id) override; void OnKeyEvent( const std::string& component_id, - const input_method::InputMethodEngineBase::KeyboardEvent& event, + const InputMethodEngineBase::KeyboardEvent& event, IMEEngineHandlerInterface::KeyEventDoneCallback key_data) override; void OnReset(const std::string& component_id) override; void OnDeactivated(const std::string& component_id) override; diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc index c891289495f11c..221e2821f57e3f 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc @@ -57,9 +57,9 @@ namespace SetSelectionRange = extensions::api::input_method_private::SetSelectionRange; namespace FinishComposingText = extensions::api::input_method_private::FinishComposingText; -using ui::IMEEngineHandlerInterface; -using input_method::InputMethodEngineBase; using chromeos::InputMethodEngine; +using chromeos::InputMethodEngineBase; +using ui::IMEEngineHandlerInterface; namespace { const char kErrorEngineNotAvailable[] = "The engine is not available."; @@ -141,7 +141,7 @@ class ImeObserverChromeOS : public ui::ImeObserver { ~ImeObserverChromeOS() override = default; - // input_method::InputMethodEngineBase::Observer overrides. + // chromeos::InputMethodEngineBase::Observer overrides. void OnInputContextUpdate( const IMEEngineHandlerInterface::InputContext& context) override { if (extension_id_.empty() || diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h index c9c86e170154dd..aa03b45186b9cf 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h @@ -188,7 +188,7 @@ class InputImeEventRouter : public InputImeEventRouterBase { void UnregisterAllImes(const std::string& extension_id); chromeos::InputMethodEngine* GetEngine(const std::string& extension_id); - input_method::InputMethodEngineBase* GetEngineIfActive( + chromeos::InputMethodEngineBase* GetEngineIfActive( const std::string& extension_id, std::string* error) override; diff --git a/chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h b/chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h index 5bdc562d404ebd..6d3edec518b94c 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h +++ b/chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h @@ -22,7 +22,7 @@ class InputImeEventRouterBase { virtual ~InputImeEventRouterBase(); // Gets the input method engine if the extension is active. - virtual input_method::InputMethodEngineBase* GetEngineIfActive( + virtual chromeos::InputMethodEngineBase* GetEngineIfActive( const std::string& extension_id, std::string* error) = 0;