Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / input_method / input_method_persistence.h
index 27fba16..a9fe28c 100644 (file)
@@ -11,6 +11,8 @@
 #include "base/compiler_specific.h"
 #include "chromeos/ime/input_method_manager.h"
 
+class PrefService;
+
 namespace chromeos {
 namespace input_method {
 
@@ -21,12 +23,13 @@ class InputMethodPersistence : public InputMethodManager::Observer {
  public:
   // Constructs an instance that will observe input method changes on the
   // provided InputMethodManager. The client is responsible for calling
-  // OnSessionStateChange whenever the InputMethodManager::State changes.
+  // OnSessionStateChange whenever the InputMethodManager::UISessionState
+  // changes.
   explicit InputMethodPersistence(InputMethodManager* input_method_manager);
   virtual ~InputMethodPersistence();
 
   // Receives notification of session state changes.
-  void OnSessionStateChange(InputMethodManager::State new_state);
+  void OnSessionStateChange(InputMethodManager::UISessionState new_session);
 
   // InputMethodManager::Observer overrides.
   virtual void InputMethodChanged(InputMethodManager* manager,
@@ -34,10 +37,14 @@ class InputMethodPersistence : public InputMethodManager::Observer {
 
  private:
   InputMethodManager* input_method_manager_;
-  InputMethodManager::State state_;
+  InputMethodManager::UISessionState ui_session_;
   DISALLOW_COPY_AND_ASSIGN(InputMethodPersistence);
 };
 
+void SetUserLRUInputMethodPreferenceForTesting(const std::string& username,
+                                               const std::string& input_method,
+                                               PrefService* local_state);
+
 }  // namespace input_method
 }  // namespace chromeos