Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / preferences.h
index 0d24b05..df2a9b9 100644 (file)
@@ -13,6 +13,7 @@
 #include "base/prefs/pref_member.h"
 #include "chrome/browser/chromeos/language_preferences.h"
 #include "chrome/browser/prefs/pref_service_syncable_observer.h"
+#include "chromeos/ime/input_method_manager.h"
 #include "components/user_manager/user_manager.h"
 
 class PrefRegistrySimple;
@@ -52,10 +53,12 @@ class Preferences : public PrefServiceSyncableObserver,
 
   // This method will initialize Chrome OS settings to values in user prefs.
   // |user| is the user owning this preferences.
-  void Init(PrefServiceSyncable* prefs, const user_manager::User* user);
+  void Init(Profile* profile, const user_manager::User* user);
 
-  void InitUserPrefsForTesting(PrefServiceSyncable* prefs,
-                               const user_manager::User* user);
+  void InitUserPrefsForTesting(
+      PrefServiceSyncable* prefs,
+      const user_manager::User* user,
+      scoped_refptr<input_method::InputMethodManager::State> ime_state);
   void SetInputMethodListForTesting();
 
  private:
@@ -107,6 +110,8 @@ class Preferences : public PrefServiceSyncableObserver,
   virtual void ActiveUserChanged(
       const user_manager::User* active_user) OVERRIDE;
 
+  void ActivateInputMethods(const user_manager::User* active_user);
+
   PrefServiceSyncable* prefs_;
 
   input_method::InputMethodManager* input_method_manager_;
@@ -141,6 +146,9 @@ class Preferences : public PrefServiceSyncableObserver,
   // Whether user is a primary user.
   bool user_is_primary_;
 
+  // Input Methods state for this user.
+  scoped_refptr<input_method::InputMethodManager::State> ime_state_;
+
   DISALLOW_COPY_AND_ASSIGN(Preferences);
 };