Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.h

Issue 2797743002: ash: Merge LoginStatus update code path (Closed)
Patch Set: for #2 comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "ash/common/accessibility_types.h" 14 #include "ash/common/accessibility_types.h"
15 #include "ash/common/system/chromeos/supervised/custodian_info_tray_observer.h" 15 #include "ash/common/system/chromeos/supervised/custodian_info_tray_observer.h"
16 #include "ash/common/system/tray/ime_info.h" 16 #include "ash/common/system/tray/ime_info.h"
17 #include "ash/common/system/tray/system_tray_delegate.h" 17 #include "ash/common/system/tray/system_tray_delegate.h"
18 #include "base/callback_forward.h"
19 #include "base/callback_list.h"
20 #include "base/macros.h" 18 #include "base/macros.h"
21 #include "base/observer_list.h" 19 #include "base/observer_list.h"
22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 20 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
23 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/supervised_user/supervised_user_service_observer.h" 22 #include "chrome/browser/supervised_user/supervised_user_service_observer.h"
25 #include "chrome/browser/ui/browser_list_observer.h" 23 #include "chrome/browser/ui/browser_list_observer.h"
26 #include "chromeos/dbus/session_manager_client.h"
27 #include "components/policy/core/common/cloud/cloud_policy_store.h" 24 #include "components/policy/core/common/cloud/cloud_policy_store.h"
28 #include "components/prefs/pref_change_registrar.h" 25 #include "components/prefs/pref_change_registrar.h"
29 #include "components/signin/core/account_id/account_id.h"
30 #include "components/user_manager/user_manager.h"
31 #include "content/public/browser/notification_observer.h" 26 #include "content/public/browser/notification_observer.h"
32 #include "content/public/browser/notification_registrar.h" 27 #include "content/public/browser/notification_registrar.h"
33 #include "extensions/browser/app_window/app_window_registry.h" 28 #include "extensions/browser/app_window/app_window_registry.h"
34 #include "ui/base/ime/chromeos/ime_keyboard.h" 29 #include "ui/base/ime/chromeos/ime_keyboard.h"
35 #include "ui/base/ime/chromeos/input_method_manager.h" 30 #include "ui/base/ime/chromeos/input_method_manager.h"
36 #include "ui/chromeos/ime/input_method_menu_manager.h" 31 #include "ui/chromeos/ime/input_method_menu_manager.h"
37 32
38 namespace ash { 33 namespace ash {
39 class SystemTrayNotifier; 34 class SystemTrayNotifier;
40 } 35 }
41 36
42 namespace user_manager {
43 class User;
44 }
45
46 namespace chromeos { 37 namespace chromeos {
47 38
48 class SystemTrayDelegateChromeOS 39 class SystemTrayDelegateChromeOS
49 : public ui::ime::InputMethodMenuManager::Observer, 40 : public ui::ime::InputMethodMenuManager::Observer,
50 public ash::SystemTrayDelegate, 41 public ash::SystemTrayDelegate,
51 public SessionManagerClient::Observer,
52 public content::NotificationObserver, 42 public content::NotificationObserver,
53 public input_method::InputMethodManager::Observer, 43 public input_method::InputMethodManager::Observer,
54 public policy::CloudPolicyStore::Observer, 44 public policy::CloudPolicyStore::Observer,
55 public chrome::BrowserListObserver, 45 public chrome::BrowserListObserver,
56 public extensions::AppWindowRegistry::Observer, 46 public extensions::AppWindowRegistry::Observer,
57 public user_manager::UserManager::Observer,
58 public user_manager::UserManager::UserSessionStateObserver,
59 public SupervisedUserServiceObserver, 47 public SupervisedUserServiceObserver,
60 public input_method::InputMethodManager::ImeMenuObserver { 48 public input_method::InputMethodManager::ImeMenuObserver {
61 public: 49 public:
62 SystemTrayDelegateChromeOS(); 50 SystemTrayDelegateChromeOS();
63 ~SystemTrayDelegateChromeOS() override; 51 ~SystemTrayDelegateChromeOS() override;
64 52
65 // Overridden from ash::SystemTrayDelegate: 53 // Overridden from ash::SystemTrayDelegate:
66 void Initialize() override; 54 void Initialize() override;
67 ash::LoginStatus GetUserLoginStatus() const override; 55 ash::LoginStatus GetUserLoginStatus() const override;
68 std::string GetEnterpriseDomain() const override; 56 std::string GetEnterpriseDomain() const override;
(...skipping 18 matching lines...) Expand all
87 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; 75 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
88 void ActiveUserWasChanged() override; 76 void ActiveUserWasChanged() override;
89 bool IsSearchKeyMappedToCapsLock() override; 77 bool IsSearchKeyMappedToCapsLock() override;
90 void AddCustodianInfoTrayObserver( 78 void AddCustodianInfoTrayObserver(
91 ash::CustodianInfoTrayObserver* observer) override; 79 ash::CustodianInfoTrayObserver* observer) override;
92 void RemoveCustodianInfoTrayObserver( 80 void RemoveCustodianInfoTrayObserver(
93 ash::CustodianInfoTrayObserver* observer) override; 81 ash::CustodianInfoTrayObserver* observer) override;
94 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem( 82 std::unique_ptr<ash::SystemTrayItem> CreateRotationLockTrayItem(
95 ash::SystemTray* tray) override; 83 ash::SystemTray* tray) override;
96 84
97 // Overridden from user_manager::UserManager::UserSessionStateObserver:
98 void UserChangedChildStatus(user_manager::User* user) override;
99
100 private: 85 private:
101 ash::SystemTrayNotifier* GetSystemTrayNotifier(); 86 ash::SystemTrayNotifier* GetSystemTrayNotifier();
102 87
103 void SetProfile(Profile* profile); 88 void SetProfile(Profile* profile);
104 89
105 bool UnsetProfile(Profile* profile); 90 bool UnsetProfile(Profile* profile);
106 91
107 void UpdateShowLogoutButtonInTray(); 92 void UpdateShowLogoutButtonInTray();
108 93
109 void UpdateLogoutDialogDuration(); 94 void UpdateLogoutDialogDuration();
110 95
111 void UpdateSessionStartTime(); 96 void UpdateSessionStartTime();
112 97
113 void UpdateSessionLengthLimit(); 98 void UpdateSessionLengthLimit();
114 99
115 void StopObservingAppWindowRegistry(); 100 void StopObservingAppWindowRegistry();
116 101
117 void StopObservingCustodianInfoChanges(); 102 void StopObservingCustodianInfoChanges();
118 103
119 // Notify observers if the current user has no more open browser or app 104 // Notify observers if the current user has no more open browser or app
120 // windows. 105 // windows.
121 void NotifyIfLastWindowClosed(); 106 void NotifyIfLastWindowClosed();
122 107
123 // Overridden from SessionManagerClient::Observer.
124 void ScreenIsLocked() override;
125 void ScreenIsUnlocked() override;
126
127 // content::NotificationObserver implementation. 108 // content::NotificationObserver implementation.
128 void Observe(int type, 109 void Observe(int type,
129 const content::NotificationSource& source, 110 const content::NotificationSource& source,
130 const content::NotificationDetails& details) override; 111 const content::NotificationDetails& details) override;
131 112
132 void OnLanguageRemapSearchKeyToChanged(); 113 void OnLanguageRemapSearchKeyToChanged();
133 114
134 void OnAccessibilityModeChanged( 115 void OnAccessibilityModeChanged(
135 ash::AccessibilityNotificationVisibility notify); 116 ash::AccessibilityNotificationVisibility notify);
136 117
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 custodian_info_changed_observers_; 176 custodian_info_changed_observers_;
196 177
197 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 178 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
198 }; 179 };
199 180
200 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 181 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
201 182
202 } // namespace chromeos 183 } // namespace chromeos
203 184
204 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 185 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698