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 // The result of the operation is reported through |callback|. | |
Mattias Nissler (ping if slow)
2013/06/12 14:53:03
no callback?
pastarmovj
2013/06/12 16:19:33
Sorry stale comment.
| |
164 virtual void SetFlagsForUser(const std::string& username, | |
165 const std::vector<std::string>& flags) = 0; | |
166 | |
161 // Creates the instance. | 167 // Creates the instance. |
162 static SessionManagerClient* Create(DBusClientImplementationType type, | 168 static SessionManagerClient* Create(DBusClientImplementationType type, |
163 dbus::Bus* bus); | 169 dbus::Bus* bus); |
164 | 170 |
165 virtual ~SessionManagerClient(); | 171 virtual ~SessionManagerClient(); |
166 | 172 |
167 protected: | 173 protected: |
168 // Create() should be used instead. | 174 // Create() should be used instead. |
169 SessionManagerClient(); | 175 SessionManagerClient(); |
170 | 176 |
171 private: | 177 private: |
172 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 178 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
173 }; | 179 }; |
174 | 180 |
175 } // namespace chromeos | 181 } // namespace chromeos |
176 | 182 |
177 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 183 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
OLD | NEW |