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

Side by Side Diff: remoting/host/daemon_process.h

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 REMOTING_HOST_DAEMON_PROCESS_H_ 5 #ifndef REMOTING_HOST_DAEMON_PROCESS_H_
6 #define REMOTING_HOST_DAEMON_PROCESS_H_ 6 #define REMOTING_HOST_DAEMON_PROCESS_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 struct SerializedTransportRoute; 25 struct SerializedTransportRoute;
26 26
27 namespace tracked_objects { 27 namespace tracked_objects {
28 class Location; 28 class Location;
29 } // namespace tracked_objects 29 } // namespace tracked_objects
30 30
31 namespace remoting { 31 namespace remoting {
32 32
33 class AutoThreadTaskRunner; 33 class AutoThreadTaskRunner;
34 class DesktopSession; 34 class DesktopSession;
35 struct DesktopSessionParams;
36 class HostEventLogger; 35 class HostEventLogger;
37 class HostStatusObserver; 36 class HostStatusObserver;
37 struct ScreenResolution;
38 38
39 // This class implements core of the daemon process. It manages the networking 39 // This class implements core of the daemon process. It manages the networking
40 // process running at lower privileges and maintains the list of desktop 40 // process running at lower privileges and maintains the list of desktop
41 // sessions. 41 // sessions.
42 class DaemonProcess 42 class DaemonProcess
43 : public Stoppable, 43 : public Stoppable,
44 public ConfigFileWatcher::Delegate, 44 public ConfigFileWatcher::Delegate,
45 public HostStatusMonitor, 45 public HostStatusMonitor,
46 public WorkerProcessIpcDelegate { 46 public WorkerProcessIpcDelegate {
47 public: 47 public:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Closes the desktop session identified by |terminal_id|. 87 // Closes the desktop session identified by |terminal_id|.
88 void CloseDesktopSession(int terminal_id); 88 void CloseDesktopSession(int terminal_id);
89 89
90 protected: 90 protected:
91 DaemonProcess(scoped_refptr<AutoThreadTaskRunner> caller_task_runner, 91 DaemonProcess(scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
92 scoped_refptr<AutoThreadTaskRunner> io_task_runner, 92 scoped_refptr<AutoThreadTaskRunner> io_task_runner,
93 const base::Closure& stopped_callback); 93 const base::Closure& stopped_callback);
94 94
95 // Creates a desktop session and assigns a unique ID to it. 95 // Creates a desktop session and assigns a unique ID to it.
96 void CreateDesktopSession(int terminal_id, 96 void CreateDesktopSession(int terminal_id,
97 const DesktopSessionParams& params, 97 const ScreenResolution& resolution,
98 bool virtual_terminal); 98 bool virtual_terminal);
99 99
100 // Requests the network process to crash. 100 // Requests the network process to crash.
101 void CrashNetworkProcess(const tracked_objects::Location& location); 101 void CrashNetworkProcess(const tracked_objects::Location& location);
102 102
103 // Reads the host configuration and launches the network process. 103 // Reads the host configuration and launches the network process.
104 void Initialize(); 104 void Initialize();
105 105
106 // Returns true if |terminal_id| is considered to be known. I.e. it is 106 // Returns true if |terminal_id| is considered to be known. I.e. it is
107 // less or equal to the highest ID we have seen so far. 107 // less or equal to the highest ID we have seen so far.
(...skipping 11 matching lines...) Expand all
119 void OnHostStarted(const std::string& xmpp_login); 119 void OnHostStarted(const std::string& xmpp_login);
120 void OnHostShutdown(); 120 void OnHostShutdown();
121 121
122 // Stoppable implementation. 122 // Stoppable implementation.
123 virtual void DoStop() OVERRIDE; 123 virtual void DoStop() OVERRIDE;
124 124
125 // Creates a platform-specific desktop session and assigns a unique ID to it. 125 // Creates a platform-specific desktop session and assigns a unique ID to it.
126 // An implementation should validate |params| as they are received via IPC. 126 // An implementation should validate |params| as they are received via IPC.
127 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession( 127 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
128 int terminal_id, 128 int terminal_id,
129 const DesktopSessionParams& params, 129 const ScreenResolution& resolution,
130 bool virtual_terminal) = 0; 130 bool virtual_terminal) = 0;
131 131
132 // Requests the network process to crash. 132 // Requests the network process to crash.
133 virtual void DoCrashNetworkProcess( 133 virtual void DoCrashNetworkProcess(
134 const tracked_objects::Location& location) = 0; 134 const tracked_objects::Location& location) = 0;
135 135
136 // Launches the network process and establishes an IPC channel with it. 136 // Launches the network process and establishes an IPC channel with it.
137 virtual void LaunchNetworkProcess() = 0; 137 virtual void LaunchNetworkProcess() = 0;
138 138
139 scoped_refptr<AutoThreadTaskRunner> caller_task_runner() { 139 scoped_refptr<AutoThreadTaskRunner> caller_task_runner() {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 scoped_ptr<HostEventLogger> host_event_logger_; 178 scoped_ptr<HostEventLogger> host_event_logger_;
179 179
180 base::WeakPtrFactory<DaemonProcess> weak_factory_; 180 base::WeakPtrFactory<DaemonProcess> weak_factory_;
181 181
182 DISALLOW_COPY_AND_ASSIGN(DaemonProcess); 182 DISALLOW_COPY_AND_ASSIGN(DaemonProcess);
183 }; 183 };
184 184
185 } // namespace remoting 185 } // namespace remoting
186 186
187 #endif // REMOTING_HOST_DAEMON_PROCESS_H_ 187 #endif // REMOTING_HOST_DAEMON_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698