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

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

Issue 12096071: Adding a unit test to verify the IPC channel between the network and desktop processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix posix #2 Created 7 years, 10 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
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DESKTOP_SESSION_CONNECTOR_H_ 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_
6 #define REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ 6 #define REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/process.h"
10 #include "ipc/ipc_platform_file.h" 11 #include "ipc/ipc_platform_file.h"
11 12
12 namespace remoting { 13 namespace remoting {
13 14
14 class DesktopSessionProxy; 15 class DesktopSessionProxy;
15 16
16 // Provides a way to connect a terminal (i.e. a remote client) with a desktop 17 // Provides a way to connect a terminal (i.e. a remote client) with a desktop
17 // session (i.e. the screen, keyboard and the rest). 18 // session (i.e. the screen, keyboard and the rest).
18 class DesktopSessionConnector { 19 class DesktopSessionConnector {
19 public: 20 public:
20 DesktopSessionConnector() {} 21 DesktopSessionConnector() {}
21 virtual ~DesktopSessionConnector() {} 22 virtual ~DesktopSessionConnector() {}
22 23
23 // Requests the daemon process to create a desktop session and associates 24 // Requests the daemon process to create a desktop session and associates
24 // |desktop_session_proxy| with it. 25 // |desktop_session_proxy| with it.
25 virtual void ConnectTerminal( 26 virtual void ConnectTerminal(
26 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) = 0; 27 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) = 0;
27 28
28 // Requests the daemon process disconnect |desktop_session_proxy| from 29 // Requests the daemon process disconnect |desktop_session_proxy| from
29 // the associated desktop session. 30 // the associated desktop session.
30 virtual void DisconnectTerminal( 31 virtual void DisconnectTerminal(
31 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) = 0; 32 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) = 0;
32 33
33 // Notifies the network process that |terminal_id| is now attached to 34 // Notifies the network process that |terminal_id| is now attached to
34 // a desktop integration process. |desktop_process| specifies the process 35 // a desktop integration process. |desktop_process| specifies the process
35 // handle. |desktop_pipe| is the client end of the pipe opened by the desktop 36 // handle. |desktop_pipe| is the client end of the pipe opened by the desktop
36 // process. 37 // process.
37 virtual void OnDesktopSessionAgentAttached( 38 virtual void OnDesktopSessionAgentAttached(
38 int terminal_id, 39 int terminal_id,
39 IPC::PlatformFileForTransit desktop_process, 40 base::ProcessHandle desktop_process,
40 IPC::PlatformFileForTransit desktop_pipe) = 0; 41 IPC::PlatformFileForTransit desktop_pipe) = 0;
41 42
42 // Notifies the network process that the daemon has disconnected the desktop 43 // Notifies the network process that the daemon has disconnected the desktop
43 // session from the associated descktop environment. 44 // session from the associated descktop environment.
44 virtual void OnTerminalDisconnected(int terminal_id) = 0; 45 virtual void OnTerminalDisconnected(int terminal_id) = 0;
45 46
46 private: 47 private:
47 DISALLOW_COPY_AND_ASSIGN(DesktopSessionConnector); 48 DISALLOW_COPY_AND_ASSIGN(DesktopSessionConnector);
48 }; 49 };
49 50
50 } // namespace remoting 51 } // namespace remoting
51 52
52 #endif // REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_ 53 #endif // REMOTING_HOST_DESKTOP_SESSION_CONNECTOR_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698