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 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual void AddObserver(Observer* observer) = 0; | 63 virtual void AddObserver(Observer* observer) = 0; |
64 virtual void RemoveObserver(Observer* observer) = 0; | 64 virtual void RemoveObserver(Observer* observer) = 0; |
65 virtual bool HasObserver(Observer* observer) = 0; | 65 virtual bool HasObserver(Observer* observer) = 0; |
66 | 66 |
67 // Kicks off an attempt to emit the "login-prompt-visible" upstart signal. | 67 // Kicks off an attempt to emit the "login-prompt-visible" upstart signal. |
68 virtual void EmitLoginPromptVisible() = 0; | 68 virtual void EmitLoginPromptVisible() = 0; |
69 | 69 |
70 // Restarts a job referenced by |pid| with the provided command line. | 70 // Restarts a job referenced by |pid| with the provided command line. |
71 virtual void RestartJob(int pid, const std::string& command_line) = 0; | 71 virtual void RestartJob(int pid, const std::string& command_line) = 0; |
72 | 72 |
73 // Used for StartSession. Takes a boolean indicating whether the | |
74 // operation was successful or not. | |
75 typedef base::Callback<void(bool success)> StartSessionCallback; | |
76 | |
77 // Starts the session for the user. | 73 // Starts the session for the user. |
78 virtual void StartSession(const std::string& user_email, | 74 virtual void StartSession(const std::string& user_email) = 0; |
79 const StartSessionCallback& callback) = 0; | |
80 | 75 |
81 // Stops the current session. | 76 // Stops the current session. |
82 virtual void StopSession() = 0; | 77 virtual void StopSession() = 0; |
83 | 78 |
84 // Starts the factory reset. | 79 // Starts the factory reset. |
85 virtual void StartDeviceWipe() = 0; | 80 virtual void StartDeviceWipe() = 0; |
86 | 81 |
87 // Locks the screen. | 82 // Locks the screen. |
88 virtual void RequestLockScreen() = 0; | 83 virtual void RequestLockScreen() = 0; |
89 | 84 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // Create() should be used instead. | 179 // Create() should be used instead. |
185 SessionManagerClient(); | 180 SessionManagerClient(); |
186 | 181 |
187 private: | 182 private: |
188 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 183 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
189 }; | 184 }; |
190 | 185 |
191 } // namespace chromeos | 186 } // namespace chromeos |
192 | 187 |
193 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 188 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
OLD | NEW |