| 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 // Overridden from extensions::AppWindowRegistry::Observer. | 1055 // Overridden from extensions::AppWindowRegistry::Observer. |
| 1056 void SystemTrayDelegateChromeOS::OnAppWindowRemoved( | 1056 void SystemTrayDelegateChromeOS::OnAppWindowRemoved( |
| 1057 extensions::AppWindow* app_window) { | 1057 extensions::AppWindow* app_window) { |
| 1058 NotifyIfLastWindowClosed(); | 1058 NotifyIfLastWindowClosed(); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 // Overridden from SupervisedUserServiceObserver. | 1061 // Overridden from SupervisedUserServiceObserver. |
| 1062 void SystemTrayDelegateChromeOS::OnCustodianInfoChanged() { | 1062 void SystemTrayDelegateChromeOS::OnCustodianInfoChanged() { |
| 1063 FOR_EACH_OBSERVER( | 1063 for (ash::CustodianInfoTrayObserver& observer : |
| 1064 ash::CustodianInfoTrayObserver, custodian_info_changed_observers_, | 1064 custodian_info_changed_observers_) { |
| 1065 OnCustodianInfoChanged()); | 1065 observer.OnCustodianInfoChanged(); |
| 1066 } |
| 1066 } | 1067 } |
| 1067 | 1068 |
| 1068 void SystemTrayDelegateChromeOS::OnAccessibilityStatusChanged( | 1069 void SystemTrayDelegateChromeOS::OnAccessibilityStatusChanged( |
| 1069 const AccessibilityStatusEventDetails& details) { | 1070 const AccessibilityStatusEventDetails& details) { |
| 1070 if (details.notification_type == ACCESSIBILITY_MANAGER_SHUTDOWN) | 1071 if (details.notification_type == ACCESSIBILITY_MANAGER_SHUTDOWN) |
| 1071 accessibility_subscription_.reset(); | 1072 accessibility_subscription_.reset(); |
| 1072 else | 1073 else |
| 1073 OnAccessibilityModeChanged(details.notify); | 1074 OnAccessibilityModeChanged(details.notify); |
| 1074 } | 1075 } |
| 1075 | 1076 |
| 1076 void SystemTrayDelegateChromeOS::OnShutdownPolicyChanged( | 1077 void SystemTrayDelegateChromeOS::OnShutdownPolicyChanged( |
| 1077 bool reboot_on_shutdown) { | 1078 bool reboot_on_shutdown) { |
| 1078 // Notify all observers. | 1079 // Notify all observers. |
| 1079 FOR_EACH_OBSERVER(ash::ShutdownPolicyObserver, shutdown_policy_observers_, | 1080 for (ash::ShutdownPolicyObserver& observer : shutdown_policy_observers_) |
| 1080 OnShutdownPolicyChanged(reboot_on_shutdown)); | 1081 observer.OnShutdownPolicyChanged(reboot_on_shutdown); |
| 1081 } | 1082 } |
| 1082 | 1083 |
| 1083 void SystemTrayDelegateChromeOS::ImeMenuActivationChanged(bool is_active) { | 1084 void SystemTrayDelegateChromeOS::ImeMenuActivationChanged(bool is_active) { |
| 1084 GetSystemTrayNotifier()->NotifyRefreshIMEMenu(is_active); | 1085 GetSystemTrayNotifier()->NotifyRefreshIMEMenu(is_active); |
| 1085 } | 1086 } |
| 1086 | 1087 |
| 1087 void SystemTrayDelegateChromeOS::ImeMenuListChanged() {} | 1088 void SystemTrayDelegateChromeOS::ImeMenuListChanged() {} |
| 1088 | 1089 |
| 1089 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged( | 1090 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged( |
| 1090 const std::string& engine_id, | 1091 const std::string& engine_id, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 1124 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
| 1124 << "ENABLE_SUPERVISED_USERS undefined."; | 1125 << "ENABLE_SUPERVISED_USERS undefined."; |
| 1125 return base::string16(); | 1126 return base::string16(); |
| 1126 } | 1127 } |
| 1127 | 1128 |
| 1128 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1129 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1129 return new SystemTrayDelegateChromeOS(); | 1130 return new SystemTrayDelegateChromeOS(); |
| 1130 } | 1131 } |
| 1131 | 1132 |
| 1132 } // namespace chromeos | 1133 } // namespace chromeos |
| OLD | NEW |