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

Side by Side Diff: remoting/host/ipc_desktop_environment_factory.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: rebased 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_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_ 5 #ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_
6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_ 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 24 matching lines...) Expand all
35 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); 35 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
36 virtual ~IpcDesktopEnvironmentFactory(); 36 virtual ~IpcDesktopEnvironmentFactory();
37 37
38 virtual scoped_ptr<DesktopEnvironment> Create(ClientSession* client) OVERRIDE; 38 virtual scoped_ptr<DesktopEnvironment> Create(ClientSession* client) OVERRIDE;
39 39
40 // DesktopSessionConnector implementation. 40 // DesktopSessionConnector implementation.
41 virtual void ConnectTerminal( 41 virtual void ConnectTerminal(
42 IpcDesktopEnvironment* desktop_environment) OVERRIDE; 42 IpcDesktopEnvironment* desktop_environment) OVERRIDE;
43 virtual void DisconnectTerminal( 43 virtual void DisconnectTerminal(
44 IpcDesktopEnvironment* desktop_environment) OVERRIDE; 44 IpcDesktopEnvironment* desktop_environment) OVERRIDE;
45 virtual void OnDesktopSessionAgentAttached(
46 int terminal_id,
47 IPC::PlatformFileForTransit desktop_process,
48 IPC::PlatformFileForTransit desktop_pipe) OVERRIDE;
45 virtual void OnTerminalDisconnected(int terminal_id) OVERRIDE; 49 virtual void OnTerminalDisconnected(int terminal_id) OVERRIDE;
46 50
47 private: 51 private:
48 // IPC channel connected to the daemon process. 52 // IPC channel connected to the daemon process.
49 IPC::ChannelProxy* daemon_channel_; 53 IPC::ChannelProxy* daemon_channel_;
50 54
51 // Task runner used to service calls to the DesktopSessionConnector APIs. 55 // Task runner used to service calls to the DesktopSessionConnector APIs.
52 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 56 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
53 57
54 // List of DesktopEnvironment instances we've told the daemon process about. 58 // List of DesktopEnvironment instances we've told the daemon process about.
55 typedef std::map<int, IpcDesktopEnvironment*> ActiveConnectionsList; 59 typedef std::map<int, IpcDesktopEnvironment*> ActiveConnectionsList;
56 ActiveConnectionsList active_connections_; 60 ActiveConnectionsList active_connections_;
57 61
58 // Next desktop session ID. IDs are allocated sequentially starting from 0. 62 // Next desktop session ID. IDs are allocated sequentially starting from 0.
59 // This gives us more than 67 years of unique IDs assuming a new ID is 63 // This gives us more than 67 years of unique IDs assuming a new ID is
60 // allocated every second. 64 // allocated every second.
61 int next_id_; 65 int next_id_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); 67 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory);
64 }; 68 };
65 69
66 } // namespace remoting 70 } // namespace remoting
67 71
68 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_ 72 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_FACTORY_H_
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/ipc_desktop_environment_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698