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

Side by Side Diff: ash/system/tray/system_tray_delegate.h

Issue 2832903002: cros: Remove supervised user methods from SystemTrayDelegate (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "ash/login_status.h" 13 #include "ash/login_status.h"
14 #include "base/callback_forward.h" 14 #include "base/callback_forward.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/i18n/time_formatting.h" 16 #include "base/i18n/time_formatting.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 18
19 namespace base { 19 namespace base {
20 class TimeDelta; 20 class TimeDelta;
21 class TimeTicks; 21 class TimeTicks;
22 } 22 }
23 23
24 namespace ash { 24 namespace ash {
25 struct IMEInfo; 25 struct IMEInfo;
26 struct IMEPropertyInfo; 26 struct IMEPropertyInfo;
27 27
28 class CustodianInfoTrayObserver;
29 class SystemTray; 28 class SystemTray;
30 class SystemTrayItem; 29 class SystemTrayItem;
31 30
32 using IMEInfoList = std::vector<IMEInfo>; 31 using IMEInfoList = std::vector<IMEInfo>;
33 using IMEPropertyInfoList = std::vector<IMEPropertyInfo>; 32 using IMEPropertyInfoList = std::vector<IMEPropertyInfo>;
34 33
35 class NetworkingConfigDelegate; 34 class NetworkingConfigDelegate;
36 35
37 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the 36 // SystemTrayDelegate is intended for delegating tasks in the System Tray to the
38 // application (e.g. Chrome). These tasks should be limited to application 37 // application (e.g. Chrome). These tasks should be limited to application
39 // (browser) specific tasks. For non application specific tasks, where possible, 38 // (browser) specific tasks. For non application specific tasks, where possible,
40 // components/, chromeos/, device/, etc., code should be used directly. If more 39 // components/, chromeos/, device/, etc., code should be used directly.
41 // than one related method is being added, consider adding an additional
42 // specific delegate (e.g. CastConfigDelegate).
43 // 40 //
44 // These methods should all have trivial default implementations for platforms 41 // DEPRECATED: This class is being replaced with SystemTrayController and
45 // that do not implement the method (e.g. return false or nullptr). This 42 // SessionController to support mash/mustash. Add new code to those classes.
46 // eliminates the need to propagate default implementations across the various
47 // implementations of this class. Consumers of this delegate should handle the
48 // default return value (e.g. nullptr).
49 class ASH_EXPORT SystemTrayDelegate { 43 class ASH_EXPORT SystemTrayDelegate {
50 public: 44 public:
51 SystemTrayDelegate(); 45 SystemTrayDelegate();
52 virtual ~SystemTrayDelegate(); 46 virtual ~SystemTrayDelegate();
53 47
54 // Called after SystemTray has been instantiated. 48 // Called after SystemTray has been instantiated.
55 virtual void Initialize(); 49 virtual void Initialize();
56 50
57 // Gets information about the active user. 51 // Gets information about the active user.
58 virtual LoginStatus GetUserLoginStatus() const; 52 virtual LoginStatus GetUserLoginStatus() const;
59 53
60 // Returns the domain that manages the device, if it is enterprise-enrolled. 54 // Returns the domain that manages the device, if it is enterprise-enrolled.
61 virtual std::string GetEnterpriseDomain() const; 55 virtual std::string GetEnterpriseDomain() const;
62 56
63 // Returns the realm that manages the device, if it is enterprise enrolled 57 // Returns the realm that manages the device, if it is enterprise enrolled
64 // with Active Directory and joined the realm (Active Directory domain). 58 // with Active Directory and joined the realm (Active Directory domain).
65 virtual std::string GetEnterpriseRealm() const; 59 virtual std::string GetEnterpriseRealm() const;
66 60
67 // Returns notification for enterprise enrolled devices. 61 // Returns notification for enterprise enrolled devices.
68 virtual base::string16 GetEnterpriseMessage() const; 62 virtual base::string16 GetEnterpriseMessage() const;
69 63
70 // Returns the display email of the user that manages the current supervised
71 // user.
72 // TODO(jamescook): Migrate to SessionController. http://crbug.com/712799
73 virtual std::string GetSupervisedUserManager() const;
74
75 // Returns the name of the user that manages the current supervised user.
76 // TODO(jamescook): Migrate to SessionController. http://crbug.com/712799
77 virtual base::string16 GetSupervisedUserManagerName() const;
78
79 // Returns the notification for supervised users.
80 // TODO(jamescook): Migrate to SessionController. http://crbug.com/712799
81 virtual base::string16 GetSupervisedUserMessage() const;
82
83 // Shows information about enterprise enrolled devices. 64 // Shows information about enterprise enrolled devices.
84 virtual void ShowEnterpriseInfo(); 65 virtual void ShowEnterpriseInfo();
85 66
86 // Shows login UI to add other users to this session. 67 // Shows login UI to add other users to this session.
87 virtual void ShowUserLogin(); 68 virtual void ShowUserLogin();
88 69
89 // Returns the currently selected IME. 70 // Returns the currently selected IME.
90 virtual void GetCurrentIME(IMEInfo* info); 71 virtual void GetCurrentIME(IMEInfo* info);
91 72
92 // Returns a list of availble IMEs. 73 // Returns a list of availble IMEs.
(...skipping 21 matching lines...) Expand all
114 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit); 95 virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit);
115 96
116 // The active user has been changed. This will be called when the UI is ready 97 // The active user has been changed. This will be called when the UI is ready
117 // to be switched to the new user. 98 // to be switched to the new user.
118 // Note: This will happen after SessionObserver::ActiveUserChanged fires. 99 // Note: This will happen after SessionObserver::ActiveUserChanged fires.
119 virtual void ActiveUserWasChanged(); 100 virtual void ActiveUserWasChanged();
120 101
121 // Returns true when the Search key is configured to be treated as Caps Lock. 102 // Returns true when the Search key is configured to be treated as Caps Lock.
122 virtual bool IsSearchKeyMappedToCapsLock(); 103 virtual bool IsSearchKeyMappedToCapsLock();
123 104
124 // Adding observers that are notified when supervised info is being changed.
125 virtual void AddCustodianInfoTrayObserver(
126 CustodianInfoTrayObserver* observer);
127
128 virtual void RemoveCustodianInfoTrayObserver(
129 CustodianInfoTrayObserver* observer);
130
131 // Creates a system tray item for display rotation lock. 105 // Creates a system tray item for display rotation lock.
132 // TODO(jamescook): Remove this when mus has support for display management 106 // TODO(jamescook): Remove this when mus has support for display management
133 // and we have a DisplayManager equivalent. See http://crbug.com/548429 107 // and we have a DisplayManager equivalent. See http://crbug.com/548429
134 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( 108 virtual std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem(
135 SystemTray* tray); 109 SystemTray* tray);
136 }; 110 };
137 111
138 } // namespace ash 112 } // namespace ash
139 113
140 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ 114 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698