Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PROCESS_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_PROCESS_H_ |
| 6 #define REMOTING_HOST_DESKTOP_PROCESS_H_ | 6 #define REMOTING_HOST_DESKTOP_PROCESS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 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/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "ipc/ipc_listener.h" | 13 #include "ipc/ipc_listener.h" |
| 14 | 14 |
| 15 namespace IPC { | 15 namespace IPC { |
| 16 class ChannelProxy; | 16 class ChannelProxy; |
| 17 } // namespace IPC | 17 } // namespace IPC |
| 18 | 18 |
| 19 namespace remoting { | 19 namespace remoting { |
| 20 | 20 |
| 21 class DesktopSessionAgent; | |
| 22 | |
| 21 class DesktopProcess : public IPC::Listener { | 23 class DesktopProcess : public IPC::Listener { |
| 22 public: | 24 public: |
| 23 explicit DesktopProcess(const std::string& daemon_channel_name); | 25 explicit DesktopProcess(const std::string& daemon_channel_name); |
| 24 ~DesktopProcess(); | 26 virtual ~DesktopProcess(); |
| 25 | 27 |
| 26 // IPC::Listener implementation. | 28 // IPC::Listener implementation. |
| 27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 28 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 30 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 29 virtual void OnChannelError() OVERRIDE; | 31 virtual void OnChannelError() OVERRIDE; |
| 30 | 32 |
| 31 // Runs the desktop process. | 33 // Runs the desktop process. |
| 32 int Run(); | 34 int Run(); |
| 33 | 35 |
| 34 private: | 36 private: |
| 35 // IPC channel connecting the desktop process with the daemon process. | 37 // Crashes the process in response to a daemon's request. The daemon passes |
| 36 scoped_ptr<IPC::ChannelProxy> daemon_channel_; | 38 // the location of the code that detected the fatal error resulted in this |
| 39 // request. | |
|
Sergey Ulanov
2012/10/24 20:12:01
Not sure I understand why we need this. Is it beca
alexeypa (please no reviews)
2012/10/24 21:41:51
It is explained at the declaration of ChromotingDa
| |
| 40 void OnCrash(const std::string& function_name, | |
| 41 const std::string& file_name, | |
| 42 const int& line_number); | |
| 37 | 43 |
| 38 // Name of the IPC channel connecting the desktop process with the daemon | 44 // Name of the IPC channel connecting the desktop process with the daemon |
| 39 // process. | 45 // process. |
| 40 std::string daemon_channel_name_; | 46 std::string daemon_channel_name_; |
| 41 | 47 |
| 48 // IPC channel connecting the desktop process with the daemon process. | |
| 49 scoped_ptr<IPC::ChannelProxy> daemon_channel_; | |
| 50 | |
| 51 // Provides screen/audio capturing and input injection services for | |
| 52 // the network process. | |
| 53 scoped_ptr<DesktopSessionAgent> desktop_agent_; | |
| 54 | |
| 42 DISALLOW_COPY_AND_ASSIGN(DesktopProcess); | 55 DISALLOW_COPY_AND_ASSIGN(DesktopProcess); |
| 43 }; | 56 }; |
| 44 | 57 |
| 45 } // namespace remoting | 58 } // namespace remoting |
| 46 | 59 |
| 47 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_ | 60 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_ |
| OLD | NEW |