| 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 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 public chrome::BrowserListObserver, | 62 public chrome::BrowserListObserver, |
| 63 public extensions::AppWindowRegistry::Observer, | 63 public extensions::AppWindowRegistry::Observer, |
| 64 public user_manager::UserManager::UserSessionStateObserver, | 64 public user_manager::UserManager::UserSessionStateObserver, |
| 65 public SupervisedUserServiceObserver, | 65 public SupervisedUserServiceObserver, |
| 66 public input_method::InputMethodManager::ImeMenuObserver { | 66 public input_method::InputMethodManager::ImeMenuObserver { |
| 67 public: | 67 public: |
| 68 SystemTrayDelegateChromeOS(); | 68 SystemTrayDelegateChromeOS(); |
| 69 | 69 |
| 70 ~SystemTrayDelegateChromeOS() override; | 70 ~SystemTrayDelegateChromeOS() override; |
| 71 | 71 |
| 72 // Access a global pointer to the single instance of the |
| 73 // SystemTrayDelegateChromeOS class. |
| 74 static SystemTrayDelegateChromeOS* Get(); |
| 75 |
| 72 void InitializeOnAdapterReady( | 76 void InitializeOnAdapterReady( |
| 73 scoped_refptr<device::BluetoothAdapter> adapter); | 77 scoped_refptr<device::BluetoothAdapter> adapter); |
| 74 | 78 |
| 75 // Overridden from ash::SystemTrayDelegate: | 79 // Overridden from ash::SystemTrayDelegate: |
| 76 void Initialize() override; | 80 void Initialize() override; |
| 77 ash::LoginStatus GetUserLoginStatus() const override; | 81 ash::LoginStatus GetUserLoginStatus() const override; |
| 78 std::string GetEnterpriseDomain() const override; | 82 std::string GetEnterpriseDomain() const override; |
| 79 std::string GetEnterpriseRealm() const override; | 83 std::string GetEnterpriseRealm() const override; |
| 80 base::string16 GetEnterpriseMessage() const override; | 84 base::string16 GetEnterpriseMessage() const override; |
| 81 std::string GetSupervisedUserManager() const override; | 85 std::string GetSupervisedUserManager() const override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ash::CustodianInfoTrayObserver* observer) override; | 120 ash::CustodianInfoTrayObserver* observer) override; |
| 117 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( | 121 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( |
| 118 ash::SystemTray* tray) override; | 122 ash::SystemTray* tray) override; |
| 119 | 123 |
| 120 // Overridden from user_manager::UserManager::UserSessionStateObserver: | 124 // Overridden from user_manager::UserManager::UserSessionStateObserver: |
| 121 void UserAddedToSession(const user_manager::User* active_user) override; | 125 void UserAddedToSession(const user_manager::User* active_user) override; |
| 122 void ActiveUserChanged(const user_manager::User* active_user) override; | 126 void ActiveUserChanged(const user_manager::User* active_user) override; |
| 123 | 127 |
| 124 void UserChangedChildStatus(user_manager::User* user) override; | 128 void UserChangedChildStatus(user_manager::User* user) override; |
| 125 | 129 |
| 130 // This notifies the system that a flash update is now available, and so the |
| 131 // user should reboot. |
| 132 void SetFlashUpdateAvailable(); |
| 133 |
| 126 private: | 134 private: |
| 127 ash::SystemTrayNotifier* GetSystemTrayNotifier(); | 135 ash::SystemTrayNotifier* GetSystemTrayNotifier(); |
| 128 | 136 |
| 129 void SetProfile(Profile* profile); | 137 void SetProfile(Profile* profile); |
| 130 | 138 |
| 131 bool UnsetProfile(Profile* profile); | 139 bool UnsetProfile(Profile* profile); |
| 132 | 140 |
| 133 void UpdateShowLogoutButtonInTray(); | 141 void UpdateShowLogoutButtonInTray(); |
| 134 | 142 |
| 135 void UpdateLogoutDialogDuration(); | 143 void UpdateLogoutDialogDuration(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 Profile* user_profile_ = nullptr; | 236 Profile* user_profile_ = nullptr; |
| 229 int search_key_mapped_to_ = input_method::kSearchKey; | 237 int search_key_mapped_to_ = input_method::kSearchKey; |
| 230 bool have_session_start_time_ = false; | 238 bool have_session_start_time_ = false; |
| 231 base::TimeTicks session_start_time_; | 239 base::TimeTicks session_start_time_; |
| 232 bool have_session_length_limit_ = false; | 240 bool have_session_length_limit_ = false; |
| 233 base::TimeDelta session_length_limit_; | 241 base::TimeDelta session_length_limit_; |
| 234 std::string enterprise_domain_; | 242 std::string enterprise_domain_; |
| 235 std::string enterprise_realm_; | 243 std::string enterprise_realm_; |
| 236 bool should_run_bluetooth_discovery_ = false; | 244 bool should_run_bluetooth_discovery_ = false; |
| 237 bool session_started_ = false; | 245 bool session_started_ = false; |
| 246 bool flash_update_available_ = false; |
| 238 | 247 |
| 239 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; | 248 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; |
| 240 std::unique_ptr<device::BluetoothDiscoverySession> | 249 std::unique_ptr<device::BluetoothDiscoverySession> |
| 241 bluetooth_discovery_session_; | 250 bluetooth_discovery_session_; |
| 242 std::unique_ptr<ash::CastConfigDelegate> cast_config_delegate_; | 251 std::unique_ptr<ash::CastConfigDelegate> cast_config_delegate_; |
| 243 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; | 252 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; |
| 244 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 253 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
| 245 | 254 |
| 246 base::ObserverList<ash::CustodianInfoTrayObserver> | 255 base::ObserverList<ash::CustodianInfoTrayObserver> |
| 247 custodian_info_changed_observers_; | 256 custodian_info_changed_observers_; |
| 248 | 257 |
| 249 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; | 258 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; |
| 250 | 259 |
| 251 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); | 260 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |
| 252 }; | 261 }; |
| 253 | 262 |
| 254 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | 263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
| 255 | 264 |
| 256 } // namespace chromeos | 265 } // namespace chromeos |
| 257 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 266 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| OLD | NEW |