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 CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
14 #include "chromeos/dbus/dbus_client_implementation_type.h" | 14 #include "chromeos/dbus/dbus_client_implementation_type.h" |
15 | 15 |
16 namespace dbus { | 16 namespace dbus { |
17 class Bus; | 17 class Bus; |
18 } // namespace | 18 } // namespace dbus |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 // SessionManagerClient is used to communicate with the session manager. | 22 // SessionManagerClient is used to communicate with the session manager. |
23 class CHROMEOS_EXPORT SessionManagerClient { | 23 class CHROMEOS_EXPORT SessionManagerClient { |
24 public: | 24 public: |
25 // Interface for observing changes from the session manager. | 25 // Interface for observing changes from the session manager. |
26 class Observer { | 26 class Observer { |
27 public: | 27 public: |
28 // Called when the owner key is set. | 28 // Called when the owner key is set. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 const std::string& policy_key, | 151 const std::string& policy_key, |
152 const StorePolicyCallback& callback) = 0; | 152 const StorePolicyCallback& callback) = 0; |
153 | 153 |
154 // Sends a request to store a policy blob for the specified device-local | 154 // Sends a request to store a policy blob for the specified device-local |
155 // account. The result of the operation is reported through |callback|. | 155 // account. The result of the operation is reported through |callback|. |
156 virtual void StoreDeviceLocalAccountPolicy( | 156 virtual void StoreDeviceLocalAccountPolicy( |
157 const std::string& account_id, | 157 const std::string& account_id, |
158 const std::string& policy_blob, | 158 const std::string& policy_blob, |
159 const StorePolicyCallback& callback) = 0; | 159 const StorePolicyCallback& callback) = 0; |
160 | 160 |
| 161 // Sets the flags to be applied next time by the session manager when Chrome |
| 162 // is restarted inside an already started session for a particular user. |
| 163 virtual void SetFlagsForUser(const std::string& username, |
| 164 const std::vector<std::string>& flags) = 0; |
| 165 |
161 // Creates the instance. | 166 // Creates the instance. |
162 static SessionManagerClient* Create(DBusClientImplementationType type, | 167 static SessionManagerClient* Create(DBusClientImplementationType type, |
163 dbus::Bus* bus); | 168 dbus::Bus* bus); |
164 | 169 |
165 virtual ~SessionManagerClient(); | 170 virtual ~SessionManagerClient(); |
166 | 171 |
167 protected: | 172 protected: |
168 // Create() should be used instead. | 173 // Create() should be used instead. |
169 SessionManagerClient(); | 174 SessionManagerClient(); |
170 | 175 |
171 private: | 176 private: |
172 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 177 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
173 }; | 178 }; |
174 | 179 |
175 } // namespace chromeos | 180 } // namespace chromeos |
176 | 181 |
177 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 182 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
OLD | NEW |