Index: chrome/browser/chromeos/input_method/browser_state_monitor.h |
diff --git a/chrome/browser/chromeos/input_method/browser_state_monitor.h b/chrome/browser/chromeos/input_method/browser_state_monitor.h |
index 4512b98f815a6c9d8cf18a7e67e2623c9c63fdbf..c2bd9b0bb78fa2043f36fa9821144f753ec9689e 100644 |
--- a/chrome/browser/chromeos/input_method/browser_state_monitor.h |
+++ b/chrome/browser/chromeos/input_method/browser_state_monitor.h |
@@ -22,38 +22,32 @@ namespace input_method { |
// to the input method manager. The class also updates the appropriate Chrome |
// prefs (~/Local\ State or ~/Preferences) depending on the current browser |
// state. |
-class BrowserStateMonitor |
- : public content::NotificationObserver, |
- public input_method::InputMethodManager::Observer { |
+class BrowserStateMonitor : public content::NotificationObserver, |
+ public InputMethodManager::Observer { |
public: |
explicit BrowserStateMonitor(InputMethodManager* manager); |
virtual ~BrowserStateMonitor(); |
+ InputMethodManager::State state() const { return state_; } |
+ |
+ void SetPrefServiceForTesting(PrefService* pref_service); |
+ |
protected: |
// Updates ~/Local\ State file. protected: for testing. |
virtual void UpdateLocalState(const std::string& current_input_method); |
// Updates ~/Preferences file. protected: for testing. |
virtual void UpdateUserPreferences(const std::string& current_input_method); |
- private: |
- // InputMethodManager::Observer implementation. |
- virtual void InputMethodChanged( |
- InputMethodManager* manager, |
- const InputMethodDescriptor& current_input_method, |
- size_t num_active_input_methods) OVERRIDE; |
- virtual void ActiveInputMethodsChanged( |
- InputMethodManager* manager, |
- const InputMethodDescriptor& current_input_method, |
- size_t num_active_input_methods) OVERRIDE {} |
- virtual void PropertyListChanged( |
- InputMethodManager* manager, |
- const InputMethodPropertyList& current_ime_properties) OVERRIDE {} |
+ // InputMethodManager::Observer overrides: |
+ virtual void InputMethodChanged(InputMethodManager* manager) OVERRIDE; |
+ virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE; |
// content::NotificationObserver overrides: |
virtual void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ private: |
void SetState(InputMethodManager::State new_state); |
void InitializePrefMembers(); |
@@ -68,6 +62,9 @@ class BrowserStateMonitor |
// This is used to register this object to some browser notifications. |
content::NotificationRegistrar notification_registrar_; |
+ // For testing. |
+ PrefService* pref_service_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BrowserStateMonitor); |
}; |