| Index: chrome/browser/chromeos/preferences.h
|
| diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h
|
| index bf8e6e6d8a6a2cce8e97aec3f600e1b795ec0b56..9b4049f59c48211d564f29494b843586af37fa1b 100644
|
| --- a/chrome/browser/chromeos/preferences.h
|
| +++ b/chrome/browser/chromeos/preferences.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "ash/shell_observer.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/prefs/pref_member.h"
|
| #include "chrome/browser/chromeos/language_preferences.h"
|
| #include "chrome/browser/chromeos/login/users/user_manager.h"
|
| @@ -85,9 +86,22 @@ class Preferences : public PrefServiceSyncableObserver,
|
| const char* name,
|
| const std::string& value);
|
|
|
| + void SetPreferredLanguages(scoped_ptr<std::string> languages);
|
| +
|
| // Restores the user's preferred input method / keyboard layout on signing in.
|
| void SetInputMethodList();
|
|
|
| + // Sets the enabled extension IMEs from kLanguageEnabledExtensionImes.
|
| + void SetEnabledExtensionImes();
|
| +
|
| + // Copies language and input method prefs to their syncable counterparts.
|
| + void SetSyncableInputMethodPrefs();
|
| +
|
| + // Add the input methods from the syncable prefs to the device-local prefs.
|
| + // This should only be called once (after user's first sync) and only adds
|
| + // to, not removes from, the user's local input method prefs.
|
| + void MergeSyncedInputMethods();
|
| +
|
| // Updates the initial key repeat delay and key repeat interval following
|
| // current prefs values. We set the delay and interval at once since an
|
| // underlying XKB API requires it.
|
| @@ -126,10 +140,21 @@ class Preferences : public PrefServiceSyncableObserver,
|
| BooleanPrefMember touch_hud_projection_enabled_;
|
|
|
| // Input method preferences.
|
| + // These can't sync, because different devices can have different hardware
|
| + // keyboards or different extensions.
|
| + StringPrefMember preferred_languages_;
|
| StringPrefMember preload_engines_;
|
| + StringPrefMember enabled_extension_imes_;
|
| + // Instead of syncing the above prefs, there are syncable variants which don't
|
| + // change the device settings. We can set these to keep track of the user's
|
| + // most recent choices. That way, after the initial post-OOBE sync, we can at
|
| + // least add the user's synced choices to the values that have already been
|
| + // chosen at OOBE. Besides that, the synced values are never used.
|
| + StringPrefMember preferred_languages_syncable_;
|
| + StringPrefMember preload_engines_syncable_;
|
| + StringPrefMember enabled_extension_imes_syncable_;
|
| StringPrefMember current_input_method_;
|
| StringPrefMember previous_input_method_;
|
| - StringPrefMember enabled_extension_imes_;
|
|
|
| BooleanPrefMember xkb_auto_repeat_enabled_;
|
| IntegerPrefMember xkb_auto_repeat_delay_pref_;
|
| @@ -141,6 +166,8 @@ class Preferences : public PrefServiceSyncableObserver,
|
| // Whether user is a primary user.
|
| bool user_is_primary_;
|
|
|
| + base::WeakPtrFactory<Preferences> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Preferences);
|
| };
|
|
|
|
|