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> |
| 9 |
8 #include <map> | 10 #include <map> |
9 | 11 |
10 #include "base/basictypes.h" | 12 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
14 #include "base/process/process.h" | 16 #include "base/process/process.h" |
15 #include "base/sequenced_task_runner_helpers.h" | 17 #include "base/sequenced_task_runner_helpers.h" |
16 #include "ipc/ipc_listener.h" | 18 #include "ipc/ipc_listener.h" |
17 #include "ipc/ipc_platform_file.h" | 19 #include "ipc/ipc_platform_file.h" |
18 #include "remoting/host/audio_capturer.h" | 20 #include "remoting/host/audio_capturer.h" |
19 #include "remoting/host/desktop_environment.h" | 21 #include "remoting/host/desktop_environment.h" |
20 #include "remoting/host/screen_resolution.h" | 22 #include "remoting/host/screen_resolution.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 scoped_ptr<AudioCapturer> CreateAudioCapturer(); | 85 scoped_ptr<AudioCapturer> CreateAudioCapturer(); |
84 scoped_ptr<InputInjector> CreateInputInjector(); | 86 scoped_ptr<InputInjector> CreateInputInjector(); |
85 scoped_ptr<ScreenControls> CreateScreenControls(); | 87 scoped_ptr<ScreenControls> CreateScreenControls(); |
86 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer(); | 88 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer(); |
87 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); | 89 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); |
88 std::string GetCapabilities() const; | 90 std::string GetCapabilities() const; |
89 void SetCapabilities(const std::string& capabilities); | 91 void SetCapabilities(const std::string& capabilities); |
90 | 92 |
91 // IPC::Listener implementation. | 93 // IPC::Listener implementation. |
92 bool OnMessageReceived(const IPC::Message& message) override; | 94 bool OnMessageReceived(const IPC::Message& message) override; |
93 void OnChannelConnected(int32 peer_pid) override; | 95 void OnChannelConnected(int32_t peer_pid) override; |
94 void OnChannelError() override; | 96 void OnChannelError() override; |
95 | 97 |
96 // Connects to the desktop session agent. | 98 // Connects to the desktop session agent. |
97 bool AttachToDesktop(base::Process desktop_process, | 99 bool AttachToDesktop(base::Process desktop_process, |
98 IPC::PlatformFileForTransit desktop_pipe); | 100 IPC::PlatformFileForTransit desktop_pipe); |
99 | 101 |
100 // Closes the connection to the desktop session agent and cleans up | 102 // Closes the connection to the desktop session agent and cleans up |
101 // the associated resources. | 103 // the associated resources. |
102 void DetachFromDesktop(); | 104 void DetachFromDesktop(); |
103 | 105 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 147 |
146 // Returns a shared buffer from the list of known buffers. | 148 // Returns a shared buffer from the list of known buffers. |
147 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); | 149 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); |
148 | 150 |
149 // Handles AudioPacket notification from the desktop session agent. | 151 // Handles AudioPacket notification from the desktop session agent. |
150 void OnAudioPacket(const std::string& serialized_packet); | 152 void OnAudioPacket(const std::string& serialized_packet); |
151 | 153 |
152 // Registers a new shared buffer created by the desktop process. | 154 // Registers a new shared buffer created by the desktop process. |
153 void OnCreateSharedBuffer(int id, | 155 void OnCreateSharedBuffer(int id, |
154 IPC::PlatformFileForTransit handle, | 156 IPC::PlatformFileForTransit handle, |
155 uint32 size); | 157 uint32_t size); |
156 | 158 |
157 // Drops a cached reference to the shared buffer. | 159 // Drops a cached reference to the shared buffer. |
158 void OnReleaseSharedBuffer(int id); | 160 void OnReleaseSharedBuffer(int id); |
159 | 161 |
160 // Handles CaptureCompleted notification from the desktop session agent. | 162 // Handles CaptureCompleted notification from the desktop session agent. |
161 void OnCaptureCompleted(const SerializedDesktopFrame& serialized_frame); | 163 void OnCaptureCompleted(const SerializedDesktopFrame& serialized_frame); |
162 | 164 |
163 // Handles MouseCursor notification from the desktop session agent. | 165 // Handles MouseCursor notification from the desktop session agent. |
164 void OnMouseCursor(const webrtc::MouseCursor& mouse_cursor); | 166 void OnMouseCursor(const webrtc::MouseCursor& mouse_cursor); |
165 | 167 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 }; | 238 }; |
237 | 239 |
238 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 240 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
239 struct DesktopSessionProxyTraits { | 241 struct DesktopSessionProxyTraits { |
240 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 242 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
241 }; | 243 }; |
242 | 244 |
243 } // namespace remoting | 245 } // namespace remoting |
244 | 246 |
245 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 247 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
OLD | NEW |