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

Side by Side Diff: chromeos/dbus/session_manager_client.h

Issue 2310823003: chromeos: Remove dbus::FileDescriptor from SessionManagerClient (Closed)
Patch Set: Fix test Created 4 years, 3 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
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 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 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chromeos/chromeos_export.h" 15 #include "chromeos/chromeos_export.h"
16 #include "chromeos/dbus/dbus_client.h" 16 #include "chromeos/dbus/dbus_client.h"
17 #include "chromeos/dbus/dbus_client_implementation_type.h" 17 #include "chromeos/dbus/dbus_client_implementation_type.h"
18 #include "chromeos/dbus/dbus_method_call_status.h"
18 19
19 namespace cryptohome { 20 namespace cryptohome {
20 class Identification; 21 class Identification;
21 } 22 }
22 23
23 namespace chromeos { 24 namespace chromeos {
24 25
25 // SessionManagerClient is used to communicate with the session manager. 26 // SessionManagerClient is used to communicate with the session manager.
26 class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { 27 class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
27 public: 28 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 // Returns the most recent screen-lock state received from session_manager. 79 // Returns the most recent screen-lock state received from session_manager.
79 // This mirrors the last Observer::ScreenIsLocked() or ScreenIsUnlocked() 80 // This mirrors the last Observer::ScreenIsLocked() or ScreenIsUnlocked()
80 // call. 81 // call.
81 virtual bool IsScreenLocked() const = 0; 82 virtual bool IsScreenLocked() const = 0;
82 83
83 // Kicks off an attempt to emit the "login-prompt-visible" upstart signal. 84 // Kicks off an attempt to emit the "login-prompt-visible" upstart signal.
84 virtual void EmitLoginPromptVisible() = 0; 85 virtual void EmitLoginPromptVisible() = 0;
85 86
86 // Restarts the browser job, passing |argv| as the updated command line. 87 // Restarts the browser job, passing |argv| as the updated command line.
87 virtual void RestartJob(const std::vector<std::string>& argv) = 0; 88 // The session manager requires a RestartJob caller to open a socket pair and
89 // pass one end while holding the local end open for the duration of the call.
90 // The session manager uses this to determine whether the PID the restart
91 // request originates from belongs to the browser itself.
92 // This method duplicates |socket_fd| so it's OK to close the FD without
93 // waiting for the result.
94 virtual void RestartJob(int socket_fd,
95 const std::vector<std::string>& argv,
96 const VoidDBusMethodCallback& callback) = 0;
88 97
89 // Starts the session for the user. 98 // Starts the session for the user.
90 virtual void StartSession( 99 virtual void StartSession(
91 const cryptohome::Identification& cryptohome_id) = 0; 100 const cryptohome::Identification& cryptohome_id) = 0;
92 101
93 // Stops the current session. 102 // Stops the current session.
94 virtual void StopSession() = 0; 103 virtual void StopSession() = 0;
95 104
96 // Starts the factory reset. 105 // Starts the factory reset.
97 virtual void StartDeviceWipe() = 0; 106 virtual void StartDeviceWipe() = 0;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Create() should be used instead. 261 // Create() should be used instead.
253 SessionManagerClient(); 262 SessionManagerClient();
254 263
255 private: 264 private:
256 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); 265 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient);
257 }; 266 };
258 267
259 } // namespace chromeos 268 } // namespace chromeos
260 269
261 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ 270 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698