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_SESSION_PROXY_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
6 #define REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 6 #define REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
15 #include "base/sequenced_task_runner_helpers.h" | 15 #include "base/sequenced_task_runner_helpers.h" |
16 #include "ipc/ipc_listener.h" | 16 #include "ipc/ipc_listener.h" |
17 #include "ipc/ipc_platform_file.h" | 17 #include "ipc/ipc_platform_file.h" |
18 #include "remoting/host/audio_capturer.h" | 18 #include "remoting/host/audio_capturer.h" |
19 #include "remoting/host/desktop_environment.h" | 19 #include "remoting/host/desktop_environment.h" |
20 #include "remoting/host/screen_resolution.h" | 20 #include "remoting/host/screen_resolution.h" |
21 #include "remoting/proto/event.pb.h" | 21 #include "remoting/proto/event.pb.h" |
22 #include "remoting/protocol/clipboard_stub.h" | 22 #include "remoting/protocol/clipboard_stub.h" |
23 #include "third_party/skia/include/core/SkRegion.h" | |
24 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 23 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
25 | 24 |
26 namespace base { | 25 namespace base { |
27 class SingleThreadTaskRunner; | 26 class SingleThreadTaskRunner; |
28 } // namespace base | 27 } // namespace base |
29 | 28 |
30 namespace IPC { | 29 namespace IPC { |
31 class ChannelProxy; | 30 class ChannelProxy; |
32 class Message; | 31 class Message; |
33 } // namespace IPC | 32 } // namespace IPC |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 95 |
97 // Disconnects the client session that owns |this|. | 96 // Disconnects the client session that owns |this|. |
98 void DisconnectSession(); | 97 void DisconnectSession(); |
99 | 98 |
100 // Stores |audio_capturer| to be used to post captured audio packets. Called | 99 // Stores |audio_capturer| to be used to post captured audio packets. Called |
101 // on the |audio_capture_task_runner_| thread. | 100 // on the |audio_capture_task_runner_| thread. |
102 void SetAudioCapturer(const base::WeakPtr<IpcAudioCapturer>& audio_capturer); | 101 void SetAudioCapturer(const base::WeakPtr<IpcAudioCapturer>& audio_capturer); |
103 | 102 |
104 // APIs used to implement the webrtc::ScreenCapturer interface. These must be | 103 // APIs used to implement the webrtc::ScreenCapturer interface. These must be |
105 // called on the |video_capture_task_runner_| thread. | 104 // called on the |video_capture_task_runner_| thread. |
106 void InvalidateRegion(const SkRegion& invalid_region); | |
107 void CaptureFrame(); | 105 void CaptureFrame(); |
108 | 106 |
109 // Stores |video_capturer| to be used to post captured video frames. Called on | 107 // Stores |video_capturer| to be used to post captured video frames. Called on |
110 // the |video_capture_task_runner_| thread. | 108 // the |video_capture_task_runner_| thread. |
111 void SetVideoCapturer( | 109 void SetVideoCapturer( |
112 const base::WeakPtr<IpcVideoFrameCapturer> video_capturer); | 110 const base::WeakPtr<IpcVideoFrameCapturer> video_capturer); |
113 | 111 |
114 // APIs used to implement the InputInjector interface. | 112 // APIs used to implement the InputInjector interface. |
115 void InjectClipboardEvent(const protocol::ClipboardEvent& event); | 113 void InjectClipboardEvent(const protocol::ClipboardEvent& event); |
116 void InjectKeyEvent(const protocol::KeyEvent& event); | 114 void InjectKeyEvent(const protocol::KeyEvent& event); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 }; | 215 }; |
218 | 216 |
219 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 217 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
220 struct DesktopSessionProxyTraits { | 218 struct DesktopSessionProxyTraits { |
221 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 219 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
222 }; | 220 }; |
223 | 221 |
224 } // namespace remoting | 222 } // namespace remoting |
225 | 223 |
226 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 224 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
OLD | NEW |