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" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // Mirrors DesktopEnvironment. | 80 // Mirrors DesktopEnvironment. |
81 scoped_ptr<AudioCapturer> CreateAudioCapturer(); | 81 scoped_ptr<AudioCapturer> CreateAudioCapturer(); |
82 scoped_ptr<InputInjector> CreateInputInjector(); | 82 scoped_ptr<InputInjector> CreateInputInjector(); |
83 scoped_ptr<ScreenControls> CreateScreenControls(); | 83 scoped_ptr<ScreenControls> CreateScreenControls(); |
84 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer(); | 84 scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer(); |
85 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); | 85 scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor(); |
86 std::string GetCapabilities() const; | 86 std::string GetCapabilities() const; |
87 void SetCapabilities(const std::string& capabilities); | 87 void SetCapabilities(const std::string& capabilities); |
88 | 88 |
89 // IPC::Listener implementation. | 89 // IPC::Listener implementation. |
90 virtual bool OnMessageReceived(const IPC::Message& message) override; | 90 bool OnMessageReceived(const IPC::Message& message) override; |
91 virtual void OnChannelConnected(int32 peer_pid) override; | 91 void OnChannelConnected(int32 peer_pid) override; |
92 virtual void OnChannelError() override; | 92 void OnChannelError() override; |
93 | 93 |
94 // Connects to the desktop session agent. | 94 // Connects to the desktop session agent. |
95 bool AttachToDesktop(base::ProcessHandle desktop_process, | 95 bool AttachToDesktop(base::ProcessHandle desktop_process, |
96 IPC::PlatformFileForTransit desktop_pipe); | 96 IPC::PlatformFileForTransit desktop_pipe); |
97 | 97 |
98 // Closes the connection to the desktop session agent and cleans up | 98 // Closes the connection to the desktop session agent and cleans up |
99 // the associated resources. | 99 // the associated resources. |
100 void DetachFromDesktop(); | 100 void DetachFromDesktop(); |
101 | 101 |
102 // Disconnects the client session that owns |this|. | 102 // Disconnects the client session that owns |this|. |
(...skipping 28 matching lines...) Expand all Loading... |
131 void SetScreenResolution(const ScreenResolution& resolution); | 131 void SetScreenResolution(const ScreenResolution& resolution); |
132 | 132 |
133 private: | 133 private: |
134 friend class base::DeleteHelper<DesktopSessionProxy>; | 134 friend class base::DeleteHelper<DesktopSessionProxy>; |
135 friend struct DesktopSessionProxyTraits; | 135 friend struct DesktopSessionProxyTraits; |
136 | 136 |
137 class IpcSharedBufferCore; | 137 class IpcSharedBufferCore; |
138 class IpcSharedBuffer; | 138 class IpcSharedBuffer; |
139 typedef std::map<int, scoped_refptr<IpcSharedBufferCore> > SharedBuffers; | 139 typedef std::map<int, scoped_refptr<IpcSharedBufferCore> > SharedBuffers; |
140 | 140 |
141 virtual ~DesktopSessionProxy(); | 141 ~DesktopSessionProxy() override; |
142 | 142 |
143 // Returns a shared buffer from the list of known buffers. | 143 // Returns a shared buffer from the list of known buffers. |
144 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); | 144 scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); |
145 | 145 |
146 // Handles AudioPacket notification from the desktop session agent. | 146 // Handles AudioPacket notification from the desktop session agent. |
147 void OnAudioPacket(const std::string& serialized_packet); | 147 void OnAudioPacket(const std::string& serialized_packet); |
148 | 148 |
149 // Registers a new shared buffer created by the desktop process. | 149 // Registers a new shared buffer created by the desktop process. |
150 void OnCreateSharedBuffer(int id, | 150 void OnCreateSharedBuffer(int id, |
151 IPC::PlatformFileForTransit handle, | 151 IPC::PlatformFileForTransit handle, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 }; | 230 }; |
231 | 231 |
232 // Destroys |DesktopSessionProxy| instances on the caller's thread. | 232 // Destroys |DesktopSessionProxy| instances on the caller's thread. |
233 struct DesktopSessionProxyTraits { | 233 struct DesktopSessionProxyTraits { |
234 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); | 234 static void Destruct(const DesktopSessionProxy* desktop_session_proxy); |
235 }; | 235 }; |
236 | 236 |
237 } // namespace remoting | 237 } // namespace remoting |
238 | 238 |
239 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ | 239 #endif // REMOTING_HOST_DESKTOP_SESSION_PROXY_H_ |
OLD | NEW |