diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-25 03:25:43 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-25 03:25:43 +0000 |
commit | 12066cbcd88f48b5fcf537883b862f454f24ee0b (patch) | |
tree | 612770bd4041652aae545949de2e976d161dc44c /remoting/host/desktop_process.h | |
parent | 4418dbbe499619f77728e0390f3fe6d777565777 (diff) | |
download | chromium_src-12066cbcd88f48b5fcf537883b862f454f24ee0b.zip chromium_src-12066cbcd88f48b5fcf537883b862f454f24ee0b.tar.gz chromium_src-12066cbcd88f48b5fcf537883b862f454f24ee0b.tar.bz2 |
[Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the daemon) its client-end handle to the network process. The network process will request screen/audio capturing and input injection services using the created channel.
Accompanying changes:
- The daemon can request other processes to crash in response to critical protocol errors.
- Both network and desktop processes exit if the connection to the daemon has been disconnected.
- CreateConnectedIpcChannel() function moved to remoting/host/win/launch_process_with_token.h
- IPC::Channel::GenerateUniqueRandomChannelID() is used to generate a unique channel name.
- Added unit tests for DesktopProcess.
- Made 'remote_desktop' compilable on all platforms.
BUG=134694
Review URL: https://chromiumcodereview.appspot.com/11231060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_process.h')
-rw-r--r-- | remoting/host/desktop_process.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/remoting/host/desktop_process.h b/remoting/host/desktop_process.h index 9f36471..9226407 100644 --- a/remoting/host/desktop_process.h +++ b/remoting/host/desktop_process.h @@ -18,10 +18,12 @@ class ChannelProxy; namespace remoting { +class DesktopSessionAgent; + class DesktopProcess : public IPC::Listener { public: explicit DesktopProcess(const std::string& daemon_channel_name); - ~DesktopProcess(); + virtual ~DesktopProcess(); // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; @@ -32,13 +34,24 @@ class DesktopProcess : public IPC::Listener { int Run(); private: - // IPC channel connecting the desktop process with the daemon process. - scoped_ptr<IPC::ChannelProxy> daemon_channel_; + // Crashes the process in response to a daemon's request. The daemon passes + // the location of the code that detected the fatal error resulted in this + // request. See the declaration of ChromotingDaemonDesktopMsg_Crash message. + void OnCrash(const std::string& function_name, + const std::string& file_name, + const int& line_number); // Name of the IPC channel connecting the desktop process with the daemon // process. std::string daemon_channel_name_; + // IPC channel connecting the desktop process with the daemon process. + scoped_ptr<IPC::ChannelProxy> daemon_channel_; + + // Provides screen/audio capturing and input injection services for + // the network process. + scoped_ptr<DesktopSessionAgent> desktop_agent_; + DISALLOW_COPY_AND_ASSIGN(DesktopProcess); }; |