| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/autoclick/autoclick_controller.h" | 9 #include "ash/autoclick/autoclick_controller.h" |
| 10 #include "ash/magnifier/magnifier_constants.h" | |
| 11 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 12 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 13 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 14 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 15 #include "base/prefs/pref_member.h" | 14 #include "base/prefs/pref_member.h" |
| 16 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
| 17 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
| 18 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| 19 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
| 34 #include "chromeos/chromeos_switches.h" | 33 #include "chromeos/chromeos_switches.h" |
| 35 #include "chromeos/ime/extension_ime_util.h" | 34 #include "chromeos/ime/extension_ime_util.h" |
| 36 #include "chromeos/ime/ime_keyboard.h" | 35 #include "chromeos/ime/ime_keyboard.h" |
| 37 #include "chromeos/ime/input_method_manager.h" | 36 #include "chromeos/ime/input_method_manager.h" |
| 38 #include "chromeos/system/statistics_provider.h" | 37 #include "chromeos/system/statistics_provider.h" |
| 39 #include "components/feedback/tracing_manager.h" | 38 #include "components/feedback/tracing_manager.h" |
| 40 #include "components/pref_registry/pref_registry_syncable.h" | 39 #include "components/pref_registry/pref_registry_syncable.h" |
| 41 #include "components/user_manager/user.h" | 40 #include "components/user_manager/user.h" |
| 42 #include "third_party/icu/source/i18n/unicode/timezone.h" | 41 #include "third_party/icu/source/i18n/unicode/timezone.h" |
| 42 #include "ui/chromeos/accessibility_types.h" |
| 43 #include "ui/events/event_constants.h" | 43 #include "ui/events/event_constants.h" |
| 44 #include "ui/events/event_utils.h" | 44 #include "ui/events/event_utils.h" |
| 45 #include "url/gurl.h" | 45 #include "url/gurl.h" |
| 46 | 46 |
| 47 namespace chromeos { | 47 namespace chromeos { |
| 48 | 48 |
| 49 static const char kFallbackInputMethodLocale[] = "en-US"; | 49 static const char kFallbackInputMethodLocale[] = "en-US"; |
| 50 | 50 |
| 51 Preferences::Preferences() | 51 Preferences::Preferences() |
| 52 : prefs_(NULL), | 52 : prefs_(NULL), |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 registry->RegisterBooleanPref( | 152 registry->RegisterBooleanPref( |
| 153 prefs::kAccessibilityHighContrastEnabled, | 153 prefs::kAccessibilityHighContrastEnabled, |
| 154 false, | 154 false, |
| 155 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 155 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 156 registry->RegisterBooleanPref( | 156 registry->RegisterBooleanPref( |
| 157 prefs::kAccessibilityScreenMagnifierEnabled, | 157 prefs::kAccessibilityScreenMagnifierEnabled, |
| 158 false, | 158 false, |
| 159 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 159 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 160 registry->RegisterIntegerPref( | 160 registry->RegisterIntegerPref( |
| 161 prefs::kAccessibilityScreenMagnifierType, | 161 prefs::kAccessibilityScreenMagnifierType, |
| 162 ash::kDefaultMagnifierType, | 162 ui::kDefaultMagnifierType, |
| 163 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 163 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 164 registry->RegisterDoublePref( | 164 registry->RegisterDoublePref( |
| 165 prefs::kAccessibilityScreenMagnifierScale, | 165 prefs::kAccessibilityScreenMagnifierScale, |
| 166 std::numeric_limits<double>::min(), | 166 std::numeric_limits<double>::min(), |
| 167 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 167 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 168 registry->RegisterBooleanPref( | 168 registry->RegisterBooleanPref( |
| 169 prefs::kAccessibilityAutoclickEnabled, | 169 prefs::kAccessibilityAutoclickEnabled, |
| 170 false, | 170 false, |
| 171 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 171 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 172 registry->RegisterIntegerPref( | 172 registry->RegisterIntegerPref( |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 touch_hud_projection_enabled_.SetValue(enabled); | 665 touch_hud_projection_enabled_.SetValue(enabled); |
| 666 } | 666 } |
| 667 | 667 |
| 668 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 668 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 669 if (active_user != user_) | 669 if (active_user != user_) |
| 670 return; | 670 return; |
| 671 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 671 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 672 } | 672 } |
| 673 | 673 |
| 674 } // namespace chromeos | 674 } // namespace chromeos |
| OLD | NEW |