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(); | |
Nico
2016/12/02 01:20:07
I think we usually call these "instance()": https:
Greg K
2016/12/03 00:05:42
Done.
| |
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 bool GetFlashUpdateAvailable(); | |
134 | |
126 private: | 135 private: |
127 ash::SystemTrayNotifier* GetSystemTrayNotifier(); | 136 ash::SystemTrayNotifier* GetSystemTrayNotifier(); |
128 | 137 |
129 void SetProfile(Profile* profile); | 138 void SetProfile(Profile* profile); |
130 | 139 |
131 bool UnsetProfile(Profile* profile); | 140 bool UnsetProfile(Profile* profile); |
132 | 141 |
133 void UpdateShowLogoutButtonInTray(); | 142 void UpdateShowLogoutButtonInTray(); |
134 | 143 |
135 void UpdateLogoutDialogDuration(); | 144 void UpdateLogoutDialogDuration(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 Profile* user_profile_ = nullptr; | 237 Profile* user_profile_ = nullptr; |
229 int search_key_mapped_to_ = input_method::kSearchKey; | 238 int search_key_mapped_to_ = input_method::kSearchKey; |
230 bool have_session_start_time_ = false; | 239 bool have_session_start_time_ = false; |
231 base::TimeTicks session_start_time_; | 240 base::TimeTicks session_start_time_; |
232 bool have_session_length_limit_ = false; | 241 bool have_session_length_limit_ = false; |
233 base::TimeDelta session_length_limit_; | 242 base::TimeDelta session_length_limit_; |
234 std::string enterprise_domain_; | 243 std::string enterprise_domain_; |
235 std::string enterprise_realm_; | 244 std::string enterprise_realm_; |
236 bool should_run_bluetooth_discovery_ = false; | 245 bool should_run_bluetooth_discovery_ = false; |
237 bool session_started_ = false; | 246 bool session_started_ = false; |
247 bool flash_update_available_ = false; | |
238 | 248 |
239 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; | 249 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; |
240 std::unique_ptr<device::BluetoothDiscoverySession> | 250 std::unique_ptr<device::BluetoothDiscoverySession> |
241 bluetooth_discovery_session_; | 251 bluetooth_discovery_session_; |
242 std::unique_ptr<ash::CastConfigDelegate> cast_config_delegate_; | 252 std::unique_ptr<ash::CastConfigDelegate> cast_config_delegate_; |
243 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; | 253 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; |
244 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 254 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
245 | 255 |
246 base::ObserverList<ash::CustodianInfoTrayObserver> | 256 base::ObserverList<ash::CustodianInfoTrayObserver> |
247 custodian_info_changed_observers_; | 257 custodian_info_changed_observers_; |
248 | 258 |
249 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; | 259 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; |
250 | 260 |
251 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); | 261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |
252 }; | 262 }; |
253 | 263 |
254 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | 264 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
255 | 265 |
256 } // namespace chromeos | 266 } // namespace chromeos |
257 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 267 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
OLD | NEW |