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