diff options
author | komatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 15:48:09 +0000 |
---|---|---|
committer | komatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-21 15:48:09 +0000 |
commit | c9964aa4152c8bfbeb23daca7e0f65e9d3b16bf9 (patch) | |
tree | 6fc0d3d691efa02b0223b4278d0f3a6d49abd589 | |
parent | 88b4f23ec32b9dda49211ec58a36bb6ca12173cc (diff) | |
download | chromium_src-c9964aa4152c8bfbeb23daca7e0f65e9d3b16bf9.zip chromium_src-c9964aa4152c8bfbeb23daca7e0f65e9d3b16bf9.tar.gz chromium_src-c9964aa4152c8bfbeb23daca7e0f65e9d3b16bf9.tar.bz2 |
Delete unused IBusPanelPropertyHandler.
BUG=N/A
Review URL: https://codereview.chromium.org/77973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236530 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/input_method/input_method_engine_ibus.h | 1 | ||||
-rw-r--r-- | chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc | 23 | ||||
-rw-r--r-- | chromeos/chromeos.gyp | 2 | ||||
-rw-r--r-- | chromeos/ime/ibus_bridge.cc | 16 | ||||
-rw-r--r-- | chromeos/ime/ibus_bridge.h | 23 | ||||
-rw-r--r-- | chromeos/ime/mock_ime_property_handler.cc | 26 | ||||
-rw-r--r-- | chromeos/ime/mock_ime_property_handler.h | 39 |
7 files changed, 2 insertions, 128 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus.h b/chrome/browser/chromeos/input_method/input_method_engine_ibus.h index e2ddea3..4fdbcb2 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_ibus.h +++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus.h @@ -18,6 +18,7 @@ class IBusText; namespace input_method { class CandidateWindow; +struct InputMethodProperty; struct KeyEventHandle; } // namespace input_method diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc b/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc index c36d2a5..2ccd48b 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc @@ -12,7 +12,6 @@ #include "chromeos/ime/input_method_manager.h" #include "chromeos/ime/mock_ime_candidate_window_handler.h" #include "chromeos/ime/mock_ime_input_context_handler.h" -#include "chromeos/ime/mock_ime_property_handler.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_utils.h" #include "extensions/common/manifest_handlers/background_info.h" @@ -162,12 +161,9 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, new MockIMEInputContextHandler()); scoped_ptr<MockIMECandidateWindowHandler> mock_candidate_window( new MockIMECandidateWindowHandler()); - scoped_ptr<MockIMEPropertyHandler> mock_property( - new MockIMEPropertyHandler()); IBusBridge::Get()->SetInputContextHandler(mock_input_context.get()); IBusBridge::Get()->SetCandidateWindowHandler(mock_candidate_window.get()); - IBusBridge::Get()->SetPropertyHandler(mock_property.get()); IBusEngineHandlerInterface* engine_handler = IBusBridge::Get()->GetEngineHandler(); @@ -232,7 +228,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, IBusBridge::Get()->SetInputContextHandler(NULL); IBusBridge::Get()->SetCandidateWindowHandler(NULL); - IBusBridge::Get()->SetPropertyHandler(NULL); } IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, @@ -245,12 +240,9 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, new MockIMEInputContextHandler()); scoped_ptr<MockIMECandidateWindowHandler> mock_candidate_window( new MockIMECandidateWindowHandler()); - scoped_ptr<MockIMEPropertyHandler> mock_property( - new MockIMEPropertyHandler()); IBusBridge::Get()->SetInputContextHandler(mock_input_context.get()); IBusBridge::Get()->SetCandidateWindowHandler(mock_candidate_window.get()); - IBusBridge::Get()->SetPropertyHandler(mock_property.get()); IBusEngineHandlerInterface* engine_handler = IBusBridge::Get()->GetEngineHandler(); @@ -381,7 +373,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("commitText test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char commit_text_test_script[] = "chrome.input.ime.commitText({" @@ -398,7 +389,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setComposition test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_composition_test_script[] = "chrome.input.ime.setComposition({" @@ -442,7 +432,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("clearComposition test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char commite_text_test_script[] = "chrome.input.ime.clearComposition({" @@ -461,7 +450,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:visibility test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -481,7 +469,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:cursor_visibility test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -507,7 +494,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:vertical test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -537,7 +523,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:pageSize test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -570,7 +555,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:auxTextVisibility test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -590,7 +574,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidateWindowProperties:auxText test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidate_window_properties_test_script[] = "chrome.input.ime.setCandidateWindowProperties({" @@ -615,7 +598,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCandidates test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_candidates_test_script[] = "chrome.input.ime.setCandidates({" @@ -683,7 +665,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setCursorPosition test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_cursor_position_test_script[] = "chrome.input.ime.setCursorPosition({" @@ -720,7 +701,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("setMenuItem test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char set_menu_item_test_script[] = "chrome.input.ime.setMenuItems({" @@ -775,7 +755,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("deleteSurroundingText test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); const char delete_surrounding_text_test_script[] = "chrome.input.ime.deleteSurroundingText({" @@ -796,7 +775,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, SCOPED_TRACE("onFocus test"); mock_input_context->Reset(); mock_candidate_window->Reset(); - mock_property->Reset(); { ExtensionTestMessageListener focus_listener("onFocus:text", false); @@ -838,7 +816,6 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, IBusBridge::Get()->SetInputContextHandler(NULL); IBusBridge::Get()->SetCandidateWindowHandler(NULL); - IBusBridge::Get()->SetPropertyHandler(NULL); } } // namespace diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp index 4aa79aa..abf1a03 100644 --- a/chromeos/chromeos.gyp +++ b/chromeos/chromeos.gyp @@ -434,8 +434,6 @@ 'ime/mock_ime_engine_handler.h', 'ime/mock_ime_input_context_handler.cc', 'ime/mock_ime_input_context_handler.h', - 'ime/mock_ime_property_handler.cc', - 'ime/mock_ime_property_handler.h', 'ime/mock_xkeyboard.cc', 'ime/mock_xkeyboard.h', ], diff --git a/chromeos/ime/ibus_bridge.cc b/chromeos/ime/ibus_bridge.cc index a52f6cd..e736e54 100644 --- a/chromeos/ime/ibus_bridge.cc +++ b/chromeos/ime/ibus_bridge.cc @@ -18,8 +18,7 @@ class IBusBridgeImpl : public IBusBridge { IBusBridgeImpl() : input_context_handler_(NULL), engine_handler_(NULL), - candidate_window_handler_(NULL), - panel_handler_(NULL) { + candidate_window_handler_(NULL) { } virtual ~IBusBridgeImpl() { @@ -59,18 +58,6 @@ class IBusBridgeImpl : public IBusBridge { candidate_window_handler_ = handler; } - // IBusBridge override. - virtual IBusPanelPropertyHandlerInterface* - GetPropertyHandler() const OVERRIDE { - return panel_handler_; - } - - // IBusBridge override. - virtual void SetPropertyHandler( - IBusPanelPropertyHandlerInterface* handler) OVERRIDE { - panel_handler_ = handler; - } - virtual void SetCreateEngineHandler( const std::string& engine_id, const CreateEngineHandler& handler) OVERRIDE { @@ -95,7 +82,6 @@ class IBusBridgeImpl : public IBusBridge { IBusInputContextHandlerInterface* input_context_handler_; IBusEngineHandlerInterface* engine_handler_; IBusPanelCandidateWindowHandlerInterface* candidate_window_handler_; - IBusPanelPropertyHandlerInterface* panel_handler_; std::map<std::string, CreateEngineHandler> create_engine_handler_map_; DISALLOW_COPY_AND_ASSIGN(IBusBridgeImpl); diff --git a/chromeos/ime/ibus_bridge.h b/chromeos/ime/ibus_bridge.h index 07439c4..e68e2bc 100644 --- a/chromeos/ime/ibus_bridge.h +++ b/chromeos/ime/ibus_bridge.h @@ -11,7 +11,6 @@ #include "base/callback.h" #include "chromeos/chromeos_export.h" #include "chromeos/ime/ime_constants.h" -#include "chromeos/ime/input_method_property.h" namespace chromeos { namespace input_method { @@ -155,19 +154,6 @@ class CHROMEOS_EXPORT IBusPanelCandidateWindowHandlerInterface { IBusPanelCandidateWindowHandlerInterface() {} }; -// A interface to handle the property related method call. -class CHROMEOS_EXPORT IBusPanelPropertyHandlerInterface { - public: - virtual ~IBusPanelPropertyHandlerInterface() {} - - // Called when a new property is registered. - virtual void RegisterProperties( - const chromeos::input_method::InputMethodPropertyList& properties) = 0; - - protected: - IBusPanelPropertyHandlerInterface() {} -}; - // IBusBridge provides access of each IME related handler. This class is used // for IME implementation without ibus-daemon. The legacy ibus IME communicates @@ -216,15 +202,6 @@ class IBusBridge { virtual void SetCandidateWindowHandler( IBusPanelCandidateWindowHandlerInterface* handler) = 0; - // Returns current PropertyHandler. This function returns NULL if panel window - // is not ready to use. - virtual IBusPanelPropertyHandlerInterface* GetPropertyHandler() const = 0; - - // Updates current PropertyHandler. If there is no active property service, - // pass NULL for |handler|. Caller must release |handler|. - virtual void SetPropertyHandler( - IBusPanelPropertyHandlerInterface* handler) = 0; - // Sets create engine handler for |engine_id|. |engine_id| must not be empty // and |handler| must not be null. virtual void SetCreateEngineHandler( diff --git a/chromeos/ime/mock_ime_property_handler.cc b/chromeos/ime/mock_ime_property_handler.cc deleted file mode 100644 index cedec87..0000000 --- a/chromeos/ime/mock_ime_property_handler.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromeos/ime/mock_ime_property_handler.h" - -namespace chromeos { - -MockIMEPropertyHandler::MockIMEPropertyHandler() - : register_properties_call_count_(0) { -} - -MockIMEPropertyHandler::~MockIMEPropertyHandler() { -} - -void MockIMEPropertyHandler::RegisterProperties( - const input_method::InputMethodPropertyList& properties) { - ++register_properties_call_count_; - last_registered_properties_ = properties; -} - -void MockIMEPropertyHandler::Reset() { - register_properties_call_count_ = 0; -} - -} // namespace chromeos diff --git a/chromeos/ime/mock_ime_property_handler.h b/chromeos/ime/mock_ime_property_handler.h deleted file mode 100644 index d9370f0..0000000 --- a/chromeos/ime/mock_ime_property_handler.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROMEOS_IME_MOCK_IME_PROPERTY_HANDLER_H_ -#define CHROMEOS_IME_MOCK_IME_PROPERTY_HANDLER_H_ - -#include "chromeos/ime/ibus_bridge.h" - -namespace chromeos { - -class CHROMEOS_EXPORT MockIMEPropertyHandler - : public IBusPanelPropertyHandlerInterface { - public: - MockIMEPropertyHandler(); - virtual ~MockIMEPropertyHandler(); - - virtual void RegisterProperties( - const input_method::InputMethodPropertyList& properties) OVERRIDE; - - int register_properties_call_count() { - return register_properties_call_count_; - } - - const input_method::InputMethodPropertyList& last_registered_properties() { - return last_registered_properties_; - } - - // Resets all call count. - void Reset(); - - private: - int register_properties_call_count_; - input_method::InputMethodPropertyList last_registered_properties_; -}; - -} // namespace chromeos - -#endif // CHROMEOS_IME_MOCK_IME_PROPERTY_HANDLER_H_ |