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

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

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup Created 8 years, 2 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" 12 #include "base/location.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/process.h"
15 #include "ipc/ipc_channel.h" 16 #include "ipc/ipc_channel.h"
16 #include "ipc/ipc_channel_proxy.h" 17 #include "ipc/ipc_channel_proxy.h"
18 #include "ipc/ipc_platform_file.h"
17 #include "remoting/base/stoppable.h" 19 #include "remoting/base/stoppable.h"
18 #include "remoting/host/config_file_watcher.h" 20 #include "remoting/host/config_file_watcher.h"
19 #include "remoting/host/worker_process_ipc_delegate.h" 21 #include "remoting/host/worker_process_ipc_delegate.h"
20 22
21 class FilePath; 23 class FilePath;
22 24
23 namespace base { 25 namespace base {
24 class SingleThreadTaskRunner; 26 class SingleThreadTaskRunner;
25 } // namespace base 27 } // namespace base
26 28
(...skipping 28 matching lines...) Expand all
55 57
56 // WorkerProcessIpcDelegate implementation. 58 // WorkerProcessIpcDelegate implementation.
57 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 59 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
58 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 60 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
59 virtual void OnPermanentError() OVERRIDE; 61 virtual void OnPermanentError() OVERRIDE;
60 62
61 // Sends an IPC message to the network process. The message will be dropped 63 // Sends an IPC message to the network process. The message will be dropped
62 // unless the network process is connected over the IPC channel. 64 // unless the network process is connected over the IPC channel.
63 virtual void SendToNetwork(IPC::Message* message) = 0; 65 virtual void SendToNetwork(IPC::Message* message) = 0;
64 66
67 // Called when a desktop integration process attaches to |terminal_id|.
68 // |desktop_process| is a handle of the desktop integration process.
69 // |desktop_pipe| specifies the client end of the desktop pipe. Returns true
70 // on success, false otherwise.
71 virtual bool OnDesktopSessionAgentAttached(
Sergey Ulanov 2012/10/24 20:12:01 Does this method need to be public? Maybe make it
alexeypa (please no reviews) 2012/10/24 21:41:51 It is called by DesktopSessionWin::OnDesktopSessio
72 int terminal_id,
73 base::ProcessHandle desktop_process,
74 IPC::PlatformFileForTransit desktop_pipe) = 0;
75
65 // Closes the desktop session identified by |terminal_id|. 76 // Closes the desktop session identified by |terminal_id|.
66 void CloseDesktopSession(int terminal_id); 77 void CloseDesktopSession(int terminal_id);
67 78
68 protected: 79 protected:
69 DaemonProcess(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 80 DaemonProcess(scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
70 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 81 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
71 const base::Closure& stopped_callback); 82 const base::Closure& stopped_callback);
72 83
73 // Reads the host configuration and launches the network process. 84 // Reads the host configuration and launches the network process.
74 void Initialize(); 85 void Initialize();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 138
128 // The highest desktop session ID that has been seen so far. 139 // The highest desktop session ID that has been seen so far.
129 int next_terminal_id_; 140 int next_terminal_id_;
130 141
131 DISALLOW_COPY_AND_ASSIGN(DaemonProcess); 142 DISALLOW_COPY_AND_ASSIGN(DaemonProcess);
132 }; 143 };
133 144
134 } // namespace remoting 145 } // namespace remoting
135 146
136 #endif // REMOTING_HOST_DAEMON_PROCESS_H_ 147 #endif // REMOTING_HOST_DAEMON_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698