Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.h

Issue 11466010: Decompose BrowserStateMonitor into two parts, simplifying unit tests and APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix gypi ordering. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.h
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 700bdf8e918aaa0ccac2e3d2757b6484f70c324d..0a5715b58aff24cb9ba966bc4b2991c4b20c576e 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_;

Powered by Google App Engine
This is Rietveld 408576698