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/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
| 15 #include "remoting/host/desktop_session_agent.h" |
15 | 16 |
16 namespace IPC { | 17 namespace IPC { |
17 class ChannelProxy; | 18 class ChannelProxy; |
18 } // namespace IPC | 19 } // namespace IPC |
19 | 20 |
20 namespace remoting { | 21 namespace remoting { |
21 | 22 |
22 class AutoThreadTaskRunner; | 23 class AutoThreadTaskRunner; |
23 class DesktopSessionAgent; | 24 class DesktopSessionAgent; |
24 | 25 |
25 class DesktopProcess : public IPC::Listener { | 26 class DesktopProcess : public DesktopSessionAgent::Delegate, |
| 27 public IPC::Listener { |
26 public: | 28 public: |
27 DesktopProcess(scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 29 DesktopProcess(scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
28 const std::string& daemon_channel_name); | 30 const std::string& daemon_channel_name); |
29 virtual ~DesktopProcess(); | 31 virtual ~DesktopProcess(); |
30 | 32 |
| 33 // DesktopSessionAgent::Delegate implementation. |
| 34 virtual void OnNetworkProcessDisconnected() OVERRIDE; |
| 35 virtual void InjectSas() OVERRIDE; |
| 36 |
31 // IPC::Listener implementation. | 37 // IPC::Listener implementation. |
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
33 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 39 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
34 virtual void OnChannelError() OVERRIDE; | 40 virtual void OnChannelError() OVERRIDE; |
35 | 41 |
36 // Creates the desktop agent and required threads and IPC channels. Returns | 42 // Creates the desktop agent and required threads and IPC channels. Returns |
37 // true on success. | 43 // true on success. |
38 bool Start(); | 44 bool Start(); |
39 | 45 |
40 private: | 46 private: |
(...skipping 17 matching lines...) Expand all Loading... |
58 // Provides screen/audio capturing and input injection services for | 64 // Provides screen/audio capturing and input injection services for |
59 // the network process. | 65 // the network process. |
60 scoped_refptr<DesktopSessionAgent> desktop_agent_; | 66 scoped_refptr<DesktopSessionAgent> desktop_agent_; |
61 | 67 |
62 DISALLOW_COPY_AND_ASSIGN(DesktopProcess); | 68 DISALLOW_COPY_AND_ASSIGN(DesktopProcess); |
63 }; | 69 }; |
64 | 70 |
65 } // namespace remoting | 71 } // namespace remoting |
66 | 72 |
67 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_ | 73 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_ |
OLD | NEW |