summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/input_method/input_method_manager_impl.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 00:17:04 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 00:17:04 +0000
commite6c1a7d3b21482fb58491b231a32bcff8666f73f (patch)
tree44de04765c7d85aeb2f94e0819ed1a87aa6e806a /chrome/browser/chromeos/input_method/input_method_manager_impl.h
parent06af6a46eb2f078f8df6e241051ded35b2f1ae6e (diff)
downloadchromium_src-e6c1a7d3b21482fb58491b231a32bcff8666f73f.zip
chromium_src-e6c1a7d3b21482fb58491b231a32bcff8666f73f.tar.gz
chromium_src-e6c1a7d3b21482fb58491b231a32bcff8666f73f.tar.bz2
Decompose BrowserStateMonitor into two parts, simplifying unit tests and APIs.
Decouple InputMethodManagerImpl from content notifications by requiring the client to push said notifications. BrowserStateMonitor and InputMethodPersistence thus become part of the client (configuration layer). BUG=164375 TBR=sky Review URL: https://chromiumcodereview.appspot.com/11466010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method/input_method_manager_impl.h')
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.h b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
index 700bdf8..0a5715b 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.h
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
@@ -11,24 +11,25 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
-#include "chrome/browser/chromeos/input_method/browser_state_monitor.h"
#include "chrome/browser/chromeos/input_method/candidate_window_controller.h"
#include "chrome/browser/chromeos/input_method/ibus_controller.h"
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/input_method/input_method_whitelist.h"
-#include "chrome/browser/chromeos/input_method/xkeyboard.h"
namespace chromeos {
class InputMethodEngineIBus;
namespace input_method {
class InputMethodDelegate;
+class XKeyboard;
// The implementation of InputMethodManager.
class InputMethodManagerImpl : public InputMethodManager,
public CandidateWindowController::Observer,
public IBusController::Observer {
public:
+ // Constructs an InputMethodManager instance. The client is responsible for
+ // calling |SetState| in response to relevant changes in browser state.
explicit InputMethodManagerImpl(scoped_ptr<InputMethodDelegate> delegate);
virtual ~InputMethodManagerImpl();
@@ -38,6 +39,9 @@ class InputMethodManagerImpl : public InputMethodManager,
// setters.
void Init();
+ // Receives notification of an InputMethodManager::State transition.
+ void SetState(State new_state);
+
// InputMethodManager override:
virtual void AddObserver(InputMethodManager::Observer* observer) OVERRIDE;
virtual void AddCandidateWindowObserver(
@@ -45,7 +49,6 @@ class InputMethodManagerImpl : public InputMethodManager,
virtual void RemoveObserver(InputMethodManager::Observer* observer) OVERRIDE;
virtual void RemoveCandidateWindowObserver(
InputMethodManager::CandidateWindowObserver* observer) OVERRIDE;
- virtual void SetState(State new_state) OVERRIDE;
virtual scoped_ptr<InputMethodDescriptors>
GetSupportedInputMethods() const OVERRIDE;
virtual scoped_ptr<InputMethodDescriptors>
@@ -160,10 +163,6 @@ class InputMethodManagerImpl : public InputMethodManager,
std::map<std::string, InputMethodDescriptor> extra_input_methods_;
std::map<std::string, InputMethodEngineIBus*> extra_input_method_instances_;
- // The browser state monitor is used to receive notifications from the browser
- // and call SetState() method of |this| class.
- scoped_ptr<BrowserStateMonitor> browser_state_monitor_;
-
// The IBus controller is used to control the input method status and
// allow callbacks when the input method status changes.
scoped_ptr<IBusController> ibus_controller_;