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/shared_memory_handle.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "base/process/process.h" | 15 #include "base/process/process.h" |
15 #include "base/sequenced_task_runner_helpers.h" | 16 #include "base/sequenced_task_runner_helpers.h" |
16 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
17 #include "ipc/ipc_platform_file.h" | 18 #include "ipc/ipc_platform_file.h" |
18 #include "remoting/host/audio_capturer.h" | 19 #include "remoting/host/audio_capturer.h" |
19 #include "remoting/host/desktop_environment.h" | 20 #include "remoting/host/desktop_environment.h" |
20 #include "remoting/host/screen_resolution.h" | 21 #include "remoting/host/screen_resolution.h" |
21 #include "remoting/proto/event.pb.h" | 22 #include "remoting/proto/event.pb.h" |
22 #include "remoting/protocol/clipboard_stub.h" | 23 #include "remoting/protocol/clipboard_stub.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 ~DesktopSessionProxy() override; | 145 ~DesktopSessionProxy() override; |
145 | 146 |
146 // Returns a shared buffer from the list of known buffers. | 147 // Returns a shared buffer from the list of known buffers. |
147 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); | 148 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); |
148 | 149 |
149 // Handles AudioPacket notification from the desktop session agent. | 150 // Handles AudioPacket notification from the desktop session agent. |
150 void OnAudioPacket(const std::string& serialized_packet); | 151 void OnAudioPacket(const std::string& serialized_packet); |
151 | 152 |
152 // Registers a new shared buffer created by the desktop process. | 153 // Registers a new shared buffer created by the desktop process. |
153 void OnCreateSharedBuffer(int id, | 154 void OnCreateSharedBuffer(int id, |
154 IPC::PlatformFileForTransit handle, | 155 base::SharedMemoryHandle handle, |
155 uint32 size); | 156 uint32 size); |
156 | 157 |
157 // Drops a cached reference to the shared buffer. | 158 // Drops a cached reference to the shared buffer. |
158 void OnReleaseSharedBuffer(int id); | 159 void OnReleaseSharedBuffer(int id); |
159 | 160 |
160 // Handles CaptureCompleted notification from the desktop session agent. | 161 // Handles CaptureCompleted notification from the desktop session agent. |
161 void OnCaptureCompleted(const SerializedDesktopFrame& serialized_frame); | 162 void OnCaptureCompleted(const SerializedDesktopFrame& serialized_frame); |
162 | 163 |
163 // Handles MouseCursor notification from the desktop session agent. | 164 // Handles MouseCursor notification from the desktop session agent. |
164 void OnMouseCursor(const webrtc::MouseCursor& mouse_cursor); | 165 void OnMouseCursor(const webrtc::MouseCursor& mouse_cursor); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 }; | 237 }; |
237 | 238 |
238 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 239 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
239 struct DesktopSessionProxyTraits { | 240 struct DesktopSessionProxyTraits { |
240 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 241 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
241 }; | 242 }; |
242 | 243 |
243 } // namespace remoting | 244 } // namespace remoting |
244 | 245 |
245 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 246 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
OLD | NEW |