| 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_AGENT_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
| 6 #define REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ | 6 #define REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Notifies the delegate that the network-to-desktop channel has been | 65 // Notifies the delegate that the network-to-desktop channel has been |
| 66 // disconnected. | 66 // disconnected. |
| 67 virtual void OnNetworkProcessDisconnected() = 0; | 67 virtual void OnNetworkProcessDisconnected() = 0; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 DesktopSessionAgent( | 70 DesktopSessionAgent( |
| 71 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner, | 71 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner, |
| 72 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 72 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
| 73 scoped_refptr<AutoThreadTaskRunner> input_task_runner, | 73 scoped_refptr<AutoThreadTaskRunner> input_task_runner, |
| 74 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 74 scoped_refptr<AutoThreadTaskRunner> io_task_runner); |
| 75 const DesktopEnvironmentOptions& options); | |
| 76 | 75 |
| 77 // IPC::Listener implementation. | 76 // IPC::Listener implementation. |
| 78 bool OnMessageReceived(const IPC::Message& message) override; | 77 bool OnMessageReceived(const IPC::Message& message) override; |
| 79 void OnChannelConnected(int32_t peer_pid) override; | 78 void OnChannelConnected(int32_t peer_pid) override; |
| 80 void OnChannelError() override; | 79 void OnChannelError() override; |
| 81 | 80 |
| 82 // webrtc::DesktopCapturer::Callback implementation. | 81 // webrtc::DesktopCapturer::Callback implementation. |
| 83 void OnCaptureResult(webrtc::DesktopCapturer::Result result, | 82 void OnCaptureResult(webrtc::DesktopCapturer::Result result, |
| 84 std::unique_ptr<webrtc::DesktopFrame> frame) override; | 83 std::unique_ptr<webrtc::DesktopFrame> frame) override; |
| 85 | 84 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 109 | 108 |
| 110 // ClientSessionControl interface. | 109 // ClientSessionControl interface. |
| 111 const std::string& client_jid() const override; | 110 const std::string& client_jid() const override; |
| 112 void DisconnectSession(protocol::ErrorCode error) override; | 111 void DisconnectSession(protocol::ErrorCode error) override; |
| 113 void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; | 112 void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; |
| 114 void SetDisableInputs(bool disable_inputs) override; | 113 void SetDisableInputs(bool disable_inputs) override; |
| 115 | 114 |
| 116 // Handles StartSessionAgent request from the client. | 115 // Handles StartSessionAgent request from the client. |
| 117 void OnStartSessionAgent(const std::string& authenticated_jid, | 116 void OnStartSessionAgent(const std::string& authenticated_jid, |
| 118 const ScreenResolution& resolution, | 117 const ScreenResolution& resolution, |
| 119 bool virtual_terminal); | 118 const DesktopEnvironmentOptions& options); |
| 120 | 119 |
| 121 // Handles CaptureFrame requests from the client. | 120 // Handles CaptureFrame requests from the client. |
| 122 void OnCaptureFrame(); | 121 void OnCaptureFrame(); |
| 123 | 122 |
| 124 // Handles event executor requests from the client. | 123 // Handles event executor requests from the client. |
| 125 void OnInjectClipboardEvent(const std::string& serialized_event); | 124 void OnInjectClipboardEvent(const std::string& serialized_event); |
| 126 void OnInjectKeyEvent(const std::string& serialized_event); | 125 void OnInjectKeyEvent(const std::string& serialized_event); |
| 127 void OnInjectTextEvent(const std::string& serialized_event); | 126 void OnInjectTextEvent(const std::string& serialized_event); |
| 128 void OnInjectMouseEvent(const std::string& serialized_event); | 127 void OnInjectMouseEvent(const std::string& serialized_event); |
| 129 void OnInjectTouchEvent(const std::string& serialized_event); | 128 void OnInjectTouchEvent(const std::string& serialized_event); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Captures the screen. | 184 // Captures the screen. |
| 186 std::unique_ptr<webrtc::DesktopCapturer> video_capturer_; | 185 std::unique_ptr<webrtc::DesktopCapturer> video_capturer_; |
| 187 | 186 |
| 188 // Captures mouse shapes. | 187 // Captures mouse shapes. |
| 189 std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor_; | 188 std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor_; |
| 190 | 189 |
| 191 // Keep reference to the last frame sent to make sure shared buffer is alive | 190 // Keep reference to the last frame sent to make sure shared buffer is alive |
| 192 // before it's received. | 191 // before it's received. |
| 193 std::unique_ptr<webrtc::DesktopFrame> last_frame_; | 192 std::unique_ptr<webrtc::DesktopFrame> last_frame_; |
| 194 | 193 |
| 195 DesktopEnvironmentOptions desktop_environment_options_; | |
| 196 | |
| 197 // Used to disable callbacks to |this|. | 194 // Used to disable callbacks to |this|. |
| 198 base::WeakPtrFactory<DesktopSessionAgent> weak_factory_; | 195 base::WeakPtrFactory<DesktopSessionAgent> weak_factory_; |
| 199 | 196 |
| 200 DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgent); | 197 DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgent); |
| 201 }; | 198 }; |
| 202 | 199 |
| 203 } // namespace remoting | 200 } // namespace remoting |
| 204 | 201 |
| 205 #endif // REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ | 202 #endif // REMOTING_HOST_DESKTOP_SESSION_AGENT_H_ |
| OLD | NEW |