| 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, | 907 base::Bind(&SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray, |
| 908 base::Unretained(this))); | 908 base::Unretained(this))); |
| 909 user_pref_registrar_->Add( | 909 user_pref_registrar_->Add( |
| 910 prefs::kLogoutDialogDurationMs, | 910 prefs::kLogoutDialogDurationMs, |
| 911 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, | 911 base::Bind(&SystemTrayDelegateChromeOS::UpdateLogoutDialogDuration, |
| 912 base::Unretained(this))); | 912 base::Unretained(this))); |
| 913 user_pref_registrar_->Add( | 913 user_pref_registrar_->Add( |
| 914 prefs::kAccessibilityLargeCursorEnabled, | 914 prefs::kAccessibilityLargeCursorEnabled, |
| 915 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 915 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 916 base::Unretained(this), | 916 base::Unretained(this), |
| 917 ash::A11Y_NOTIFICATION_NONE)); | 917 ui::A11Y_NOTIFICATION_NONE)); |
| 918 user_pref_registrar_->Add( | 918 user_pref_registrar_->Add( |
| 919 prefs::kAccessibilityAutoclickEnabled, | 919 prefs::kAccessibilityAutoclickEnabled, |
| 920 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 920 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 921 base::Unretained(this), | 921 base::Unretained(this), |
| 922 ash::A11Y_NOTIFICATION_NONE)); | 922 ui::A11Y_NOTIFICATION_NONE)); |
| 923 user_pref_registrar_->Add( | 923 user_pref_registrar_->Add( |
| 924 prefs::kShouldAlwaysShowAccessibilityMenu, | 924 prefs::kShouldAlwaysShowAccessibilityMenu, |
| 925 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, | 925 base::Bind(&SystemTrayDelegateChromeOS::OnAccessibilityModeChanged, |
| 926 base::Unretained(this), | 926 base::Unretained(this), |
| 927 ash::A11Y_NOTIFICATION_NONE)); | 927 ui::A11Y_NOTIFICATION_NONE)); |
| 928 user_pref_registrar_->Add( | 928 user_pref_registrar_->Add( |
| 929 prefs::kPerformanceTracingEnabled, | 929 prefs::kPerformanceTracingEnabled, |
| 930 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, | 930 base::Bind(&SystemTrayDelegateChromeOS::UpdatePerformanceTracing, |
| 931 base::Unretained(this))); | 931 base::Unretained(this))); |
| 932 | 932 |
| 933 UpdateClockType(); | 933 UpdateClockType(); |
| 934 UpdateShowLogoutButtonInTray(); | 934 UpdateShowLogoutButtonInTray(); |
| 935 UpdateLogoutDialogDuration(); | 935 UpdateLogoutDialogDuration(); |
| 936 UpdatePerformanceTracing(); | 936 UpdatePerformanceTracing(); |
| 937 OnCustodianInfoChanged(); | 937 OnCustodianInfoChanged(); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 NOTREACHED(); | 1154 NOTREACHED(); |
| 1155 } | 1155 } |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { | 1158 void SystemTrayDelegateChromeOS::OnLanguageRemapSearchKeyToChanged() { |
| 1159 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( | 1159 search_key_mapped_to_ = user_pref_registrar_->prefs()->GetInteger( |
| 1160 prefs::kLanguageRemapSearchKeyTo); | 1160 prefs::kLanguageRemapSearchKeyTo); |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( | 1163 void SystemTrayDelegateChromeOS::OnAccessibilityModeChanged( |
| 1164 ash::AccessibilityNotificationVisibility notify) { | 1164 ui::AccessibilityNotificationVisibility notify) { |
| 1165 GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); | 1165 GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { | 1168 void SystemTrayDelegateChromeOS::UpdatePerformanceTracing() { |
| 1169 if (!user_pref_registrar_) | 1169 if (!user_pref_registrar_) |
| 1170 return; | 1170 return; |
| 1171 bool value = user_pref_registrar_->prefs()->GetBoolean( | 1171 bool value = user_pref_registrar_->prefs()->GetBoolean( |
| 1172 prefs::kPerformanceTracingEnabled); | 1172 prefs::kPerformanceTracingEnabled); |
| 1173 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); | 1173 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); |
| 1174 } | 1174 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 accessibility_subscription_.reset(); | 1311 accessibility_subscription_.reset(); |
| 1312 else | 1312 else |
| 1313 OnAccessibilityModeChanged(details.notify); | 1313 OnAccessibilityModeChanged(details.notify); |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1317 return new SystemTrayDelegateChromeOS(); | 1317 return new SystemTrayDelegateChromeOS(); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 } // namespace chromeos | 1320 } // namespace chromeos |
| OLD | NEW |