OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::string id; | 103 std::string id; |
104 base::string16 name; | 104 base::string16 name; |
105 base::string16 medium_name; | 105 base::string16 medium_name; |
106 base::string16 short_name; | 106 base::string16 short_name; |
107 }; | 107 }; |
108 | 108 |
109 typedef std::vector<IMEInfo> IMEInfoList; | 109 typedef std::vector<IMEInfo> IMEInfoList; |
110 | 110 |
111 class VolumeControlDelegate; | 111 class VolumeControlDelegate; |
112 | 112 |
113 typedef std::vector<std::string> UserEmailList; | |
114 | |
115 class SystemTrayDelegate { | 113 class SystemTrayDelegate { |
116 public: | 114 public: |
117 virtual ~SystemTrayDelegate() {} | 115 virtual ~SystemTrayDelegate() {} |
118 | 116 |
119 // Called after SystemTray has been instantiated. | 117 // Called after SystemTray has been instantiated. |
120 virtual void Initialize() = 0; | 118 virtual void Initialize() = 0; |
121 | 119 |
122 // Called before SystemTray is destroyed. | 120 // Called before SystemTray is destroyed. |
123 virtual void Shutdown() = 0; | 121 virtual void Shutdown() = 0; |
124 | 122 |
125 // Returns true if system tray should be visible on startup. | 123 // Returns true if system tray should be visible on startup. |
126 virtual bool GetTrayVisibilityOnStartup() = 0; | 124 virtual bool GetTrayVisibilityOnStartup() = 0; |
127 | 125 |
128 // Gets information about the active user. | 126 // Gets information about the active user. |
129 virtual const base::string16 GetUserDisplayName() const = 0; | |
130 virtual const std::string GetUserEmail() const = 0; | |
131 virtual const gfx::ImageSkia& GetUserImage() const = 0; | |
132 virtual user::LoginStatus GetUserLoginStatus() const = 0; | 127 virtual user::LoginStatus GetUserLoginStatus() const = 0; |
133 virtual bool IsOobeCompleted() const = 0; | 128 virtual bool IsOobeCompleted() const = 0; |
134 | 129 |
135 // Returns a list of all logged in users. | |
136 virtual void GetLoggedInUsers(UserEmailList* users) = 0; | |
137 | |
138 // Switches to another active user (if that user has already signed in). | |
139 virtual void SwitchActiveUser(const std::string& email) = 0; | |
140 | |
141 // Shows UI for changing user's profile picture. | 130 // Shows UI for changing user's profile picture. |
142 virtual void ChangeProfilePicture() = 0; | 131 virtual void ChangeProfilePicture() = 0; |
143 | 132 |
144 // Returns the domain that manages the device, if it is enterprise-enrolled. | 133 // Returns the domain that manages the device, if it is enterprise-enrolled. |
145 virtual const std::string GetEnterpriseDomain() const = 0; | 134 virtual const std::string GetEnterpriseDomain() const = 0; |
146 | 135 |
147 // Returns notification for enterprise enrolled devices. | 136 // Returns notification for enterprise enrolled devices. |
148 virtual const base::string16 GetEnterpriseMessage() const = 0; | 137 virtual const base::string16 GetEnterpriseMessage() const = 0; |
149 | 138 |
150 // Returns the email of user that manages current locally managed user. | 139 // Returns the email of user that manages current locally managed user. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // Speaks the given text if spoken feedback is enabled. | 357 // Speaks the given text if spoken feedback is enabled. |
369 virtual void MaybeSpeak(const std::string& utterance) const = 0; | 358 virtual void MaybeSpeak(const std::string& utterance) const = 0; |
370 | 359 |
371 // Creates a dummy delegate for testing. | 360 // Creates a dummy delegate for testing. |
372 static SystemTrayDelegate* CreateDummyDelegate(); | 361 static SystemTrayDelegate* CreateDummyDelegate(); |
373 }; | 362 }; |
374 | 363 |
375 } // namespace ash | 364 } // namespace ash |
376 | 365 |
377 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 366 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
OLD | NEW |