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

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

Issue 12545006: The worker process launcher can now ask the worker to crash. (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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/location.h"
13 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
16 #include "base/observer_list.h" 15 #include "base/observer_list.h"
17 #include "base/process.h" 16 #include "base/process.h"
18 #include "ipc/ipc_channel.h" 17 #include "ipc/ipc_channel.h"
19 #include "ipc/ipc_channel_proxy.h" 18 #include "ipc/ipc_channel_proxy.h"
20 #include "ipc/ipc_platform_file.h" 19 #include "ipc/ipc_platform_file.h"
21 #include "remoting/base/stoppable.h" 20 #include "remoting/base/stoppable.h"
22 #include "remoting/host/config_file_watcher.h" 21 #include "remoting/host/config_file_watcher.h"
23 #include "remoting/host/host_status_monitor.h" 22 #include "remoting/host/host_status_monitor.h"
24 #include "remoting/host/worker_process_ipc_delegate.h" 23 #include "remoting/host/worker_process_ipc_delegate.h"
25 24
26 struct SerializedTransportRoute; 25 struct SerializedTransportRoute;
27 26
27 namespace tracked_objects {
28 class Location;
29 } // namespace tracked_objects
30
28 namespace remoting { 31 namespace remoting {
29 32
30 class AutoThreadTaskRunner; 33 class AutoThreadTaskRunner;
31 class DesktopSession; 34 class DesktopSession;
32 class HostEventLogger; 35 class HostEventLogger;
33 class HostStatusObserver; 36 class HostStatusObserver;
34 37
35 // This class implements core of the daemon process. It manages the networking 38 // This class implements core of the daemon process. It manages the networking
36 // process running at lower privileges and maintains the list of desktop 39 // process running at lower privileges and maintains the list of desktop
37 // sessions. 40 // sessions.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void OnHostStarted(const std::string& xmpp_login); 116 void OnHostStarted(const std::string& xmpp_login);
114 void OnHostShutdown(); 117 void OnHostShutdown();
115 118
116 // Stoppable implementation. 119 // Stoppable implementation.
117 virtual void DoStop() OVERRIDE; 120 virtual void DoStop() OVERRIDE;
118 121
119 // Creates a platform-specific desktop session and assigns a unique ID to it. 122 // Creates a platform-specific desktop session and assigns a unique ID to it.
120 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession( 123 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
121 int terminal_id) = 0; 124 int terminal_id) = 0;
122 125
126 // Requests the network process to crash.
127 virtual void DoCrashNetworkProcess(
128 const tracked_objects::Location& location) = 0;
129
123 // Launches the network process and establishes an IPC channel with it. 130 // Launches the network process and establishes an IPC channel with it.
124 virtual void LaunchNetworkProcess() = 0; 131 virtual void LaunchNetworkProcess() = 0;
125 132
126 scoped_refptr<AutoThreadTaskRunner> caller_task_runner() { 133 scoped_refptr<AutoThreadTaskRunner> caller_task_runner() {
127 return caller_task_runner_; 134 return caller_task_runner_;
128 } 135 }
129 136
130 scoped_refptr<AutoThreadTaskRunner> io_task_runner() { 137 scoped_refptr<AutoThreadTaskRunner> io_task_runner() {
131 return io_task_runner_; 138 return io_task_runner_;
132 } 139 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 scoped_ptr<HostEventLogger> host_event_logger_; 172 scoped_ptr<HostEventLogger> host_event_logger_;
166 173
167 base::WeakPtrFactory<DaemonProcess> weak_factory_; 174 base::WeakPtrFactory<DaemonProcess> weak_factory_;
168 175
169 DISALLOW_COPY_AND_ASSIGN(DaemonProcess); 176 DISALLOW_COPY_AND_ASSIGN(DaemonProcess);
170 }; 177 };
171 178
172 } // namespace remoting 179 } // namespace remoting
173 180
174 #endif // REMOTING_HOST_DAEMON_PROCESS_H_ 181 #endif // REMOTING_HOST_DAEMON_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698