| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, | 930 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, |
| 931 base::Unretained(this))); | 931 base::Unretained(this))); |
| 932 user_pref_registrar_->Add( | 932 user_pref_registrar_->Add( |
| 933 prefs::kLogoutDialogDurationMs, | 933 prefs::kLogoutDialogDurationMs, |
| 934 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, | 934 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, |
| 935 base::Unretained(this))); | 935 base::Unretained(this))); |
| 936 user_pref_registrar_->Add( | 936 user_pref_registrar_->Add( |
| 937 prefs::kAccessibilityLargeCursorEnabled, | 937 prefs::kAccessibilityLargeCursorEnabled, |
| 938 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 938 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 939 base::Unretained(this), | 939 base::Unretained(this), |
| 940 ash::A11Y_NOTIFICATION_NONE)); | 940 ui::A11Y_NOTIFICATION_NONE)); |
| 941 user_pref_registrar_->Add( | 941 user_pref_registrar_->Add( |
| 942 prefs::kAccessibilityAutoclickEnabled, | 942 prefs::kAccessibilityAutoclickEnabled, |
| 943 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 943 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 944 base::Unretained(this), | 944 base::Unretained(this), |
| 945 ash::A11Y_NOTIFICATION_NONE)); | 945 ui::A11Y_NOTIFICATION_NONE)); |
| 946 user_pref_registrar_->Add( | 946 user_pref_registrar_->Add( |
| 947 prefs::kShouldAlwaysShowAccessibilityMenu, | 947 prefs::kShouldAlwaysShowAccessibilityMenu, |
| 948 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 948 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 949 base::Unretained(this), | 949 base::Unretained(this), |
| 950 ash::A11Y_NOTIFICATION_NONE)); | 950 ui::A11Y_NOTIFICATION_NONE)); |
| 951 user_pref_registrar_->Add( | 951 user_pref_registrar_->Add( |
| 952 prefs::kPerformanceTracingEnabled, | 952 prefs::kPerformanceTracingEnabled, |
| 953 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, | 953 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, |
| 954 base::Unretained(this))); | 954 base::Unretained(this))); |
| 955 | 955 |
| 956 UpdateClockType(); | 956 UpdateClockType(); |
| 957 UpdateShowLogoutButtonInTray(); | 957 UpdateShowLogoutButtonInTray(); |
| 958 UpdateLogoutDialogDuration(); | 958 UpdateLogoutDialogDuration(); |
| 959 UpdatePerformanceTracing(); | 959 UpdatePerformanceTracing(); |
| 960 OnCustodianInfoChanged(); | 960 OnCustodianInfoChanged(); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 NOTREACHED(); | 1177 NOTREACHED(); |
| 1178 } | 1178 } |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { | 1181 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { |
| 1182 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( | 1182 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( |
| 1183 prefs::kLanguageRemapSearchKeyTo); | 1183 prefs::kLanguageRemapSearchKeyTo); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( | 1186 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( |
| 1187 ash::AccessibilityNotificationVisibility notify) { | 1187 ui::AccessibilityNotificationVisibility notify) { |
| 1188 GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); | 1188 GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { | 1191 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { |
| 1192 if (!user_pref_registrar_) | 1192 if (!user_pref_registrar_) |
| 1193 return; | 1193 return; |
| 1194 bool value = user_pref_registrar_->prefs()->GetBoolean( | 1194 bool value = user_pref_registrar_->prefs()->GetBoolean( |
| 1195 prefs::kPerformanceTracingEnabled); | 1195 prefs::kPerformanceTracingEnabled); |
| 1196 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); | 1196 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); |
| 1197 } | 1197 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 accessibility_subscription_.reset(); | 1334 accessibility_subscription_.reset(); |
| 1335 else | 1335 else |
| 1336 OnAccessibilityModeChanged(details.notify); | 1336 OnAccessibilityModeChanged(details.notify); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1339 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1340 return new SystemTrayDelegateChromeOS(); | 1340 return new SystemTrayDelegateChromeOS(); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 } // namespace chromeos | 1343 } // namespace chromeos |
| OLD | NEW |