OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 prefs::kShowLogoutButtonInTray, | 922 prefs::kShowLogoutButtonInTray, |
923 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, | 923 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, |
924 base::Unretained(this))); | 924 base::Unretained(this))); |
925 user_pref_registrar_->Add( | 925 user_pref_registrar_->Add( |
926 prefs::kLogoutDialogDurationMs, | 926 prefs::kLogoutDialogDurationMs, |
927 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, | 927 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, |
928 base::Unretained(this))); | 928 base::Unretained(this))); |
929 user_pref_registrar_->Add( | 929 user_pref_registrar_->Add( |
930 prefs::kAccessibilityLargeCursorEnabled, | 930 prefs::kAccessibilityLargeCursorEnabled, |
931 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 931 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
932 base::Unretained(this), | 932 base::Unretained(this), ash::A11Y_NOTIFICATION_NONE)); |
933 ui::A11Y_NOTIFICATION_NONE)); | |
934 user_pref_registrar_->Add( | 933 user_pref_registrar_->Add( |
935 prefs::kAccessibilityAutoclickEnabled, | 934 prefs::kAccessibilityAutoclickEnabled, |
936 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 935 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
937 base::Unretained(this), | 936 base::Unretained(this), ash::A11Y_NOTIFICATION_NONE)); |
938 ui::A11Y_NOTIFICATION_NONE)); | |
939 user_pref_registrar_->Add( | 937 user_pref_registrar_->Add( |
940 prefs::kShouldAlwaysShowAccessibilityMenu, | 938 prefs::kShouldAlwaysShowAccessibilityMenu, |
941 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 939 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
942 base::Unretained(this), | 940 base::Unretained(this), ash::A11Y_NOTIFICATION_NONE)); |
943 ui::A11Y_NOTIFICATION_NONE)); | |
944 user_pref_registrar_->Add( | 941 user_pref_registrar_->Add( |
945 prefs::kPerformanceTracingEnabled, | 942 prefs::kPerformanceTracingEnabled, |
946 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, | 943 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, |
947 base::Unretained(this))); | 944 base::Unretained(this))); |
948 | 945 |
949 UpdateShowLogoutButtonInTray(); | 946 UpdateShowLogoutButtonInTray(); |
950 UpdateLogoutDialogDuration(); | 947 UpdateLogoutDialogDuration(); |
951 UpdatePerformanceTracing(); | 948 UpdatePerformanceTracing(); |
952 OnCustodianInfoChanged(); | 949 OnCustodianInfoChanged(); |
953 search_key_mapped_to_ = | 950 search_key_mapped_to_ = |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 NOTREACHED(); | 1121 NOTREACHED(); |
1125 } | 1122 } |
1126 } | 1123 } |
1127 | 1124 |
1128 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { | 1125 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { |
1129 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( | 1126 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( |
1130 prefs::kLanguageRemapSearchKeyTo); | 1127 prefs::kLanguageRemapSearchKeyTo); |
1131 } | 1128 } |
1132 | 1129 |
1133 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( | 1130 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( |
1134 ui::AccessibilityNotificationVisibility notify) { | 1131 ash::AccessibilityNotificationVisibility notify) { |
1135 GetWmSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); | 1132 GetWmSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); |
1136 } | 1133 } |
1137 | 1134 |
1138 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { | 1135 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { |
1139 if (!user_pref_registrar_) | 1136 if (!user_pref_registrar_) |
1140 return; | 1137 return; |
1141 bool value = user_pref_registrar_->prefs()->GetBoolean( | 1138 bool value = user_pref_registrar_->prefs()->GetBoolean( |
1142 prefs::kPerformanceTracingEnabled); | 1139 prefs::kPerformanceTracingEnabled); |
1143 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); | 1140 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); |
1144 } | 1141 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 1337 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
1341 << "ENABLE_SUPERVISED_USERS undefined."; | 1338 << "ENABLE_SUPERVISED_USERS undefined."; |
1342 return base::string16(); | 1339 return base::string16(); |
1343 } | 1340 } |
1344 | 1341 |
1345 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1346 return new SystemTrayDelegateChromeOS(); | 1343 return new SystemTrayDelegateChromeOS(); |
1347 } | 1344 } |
1348 | 1345 |
1349 } // namespace chromeos | 1346 } // namespace chromeos |
OLD | NEW |