| 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_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 protocol::ClipboardStub* GetClipboardStub() override; | 119 protocol::ClipboardStub* GetClipboardStub() override; |
| 120 protocol::CursorShapeStub* GetCursorShapeStub() override; | 120 protocol::CursorShapeStub* GetCursorShapeStub() override; |
| 121 | 121 |
| 122 // protocol::ClipboardStub interface. | 122 // protocol::ClipboardStub interface. |
| 123 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; | 123 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; |
| 124 | 124 |
| 125 // protocol::CursorShapeStub interface. | 125 // protocol::CursorShapeStub interface. |
| 126 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; | 126 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; |
| 127 | 127 |
| 128 // PepperVideoRenderer::EventHandler interface. | 128 // PepperVideoRenderer::EventHandler interface. |
| 129 void OnVideoDecodeError() override; |
| 129 void OnVideoFirstFrameReceived() override; | 130 void OnVideoFirstFrameReceived() override; |
| 130 void OnVideoSize(const webrtc::DesktopSize& size, | 131 void OnVideoSize(const webrtc::DesktopSize& size, |
| 131 const webrtc::DesktopVector& dpi) override; | 132 const webrtc::DesktopVector& dpi) override; |
| 132 void OnVideoShape(const webrtc::DesktopRegion& shape) override; | 133 void OnVideoShape(const webrtc::DesktopRegion& shape) override; |
| 133 | 134 |
| 134 // Registers a global log message handler that redirects the log output to | 135 // Registers a global log message handler that redirects the log output to |
| 135 // our plugin instance. | 136 // our plugin instance. |
| 136 // This is called by the plugin's PPP_InitializeModule. | 137 // This is called by the plugin's PPP_InitializeModule. |
| 137 // Note that no logging will be processed unless a ChromotingInstance has been | 138 // Note that no logging will be processed unless a ChromotingInstance has been |
| 138 // registered for logging (see RegisterLoggingInstance). | 139 // registered for logging (see RegisterLoggingInstance). |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void HandleVideoControl(const base::DictionaryValue& data); | 186 void HandleVideoControl(const base::DictionaryValue& data); |
| 186 void HandlePauseAudio(const base::DictionaryValue& data); | 187 void HandlePauseAudio(const base::DictionaryValue& data); |
| 187 void HandleOnPinFetched(const base::DictionaryValue& data); | 188 void HandleOnPinFetched(const base::DictionaryValue& data); |
| 188 void HandleOnThirdPartyTokenFetched(const base::DictionaryValue& data); | 189 void HandleOnThirdPartyTokenFetched(const base::DictionaryValue& data); |
| 189 void HandleRequestPairing(const base::DictionaryValue& data); | 190 void HandleRequestPairing(const base::DictionaryValue& data); |
| 190 void HandleExtensionMessage(const base::DictionaryValue& data); | 191 void HandleExtensionMessage(const base::DictionaryValue& data); |
| 191 void HandleAllowMouseLockMessage(); | 192 void HandleAllowMouseLockMessage(); |
| 192 void HandleSendMouseInputWhenUnfocused(); | 193 void HandleSendMouseInputWhenUnfocused(); |
| 193 void HandleDelegateLargeCursors(); | 194 void HandleDelegateLargeCursors(); |
| 194 | 195 |
| 196 void Disconnect(); |
| 197 |
| 195 // Helper method to post messages to the webapp. | 198 // Helper method to post messages to the webapp. |
| 196 void PostChromotingMessage(const std::string& method, | 199 void PostChromotingMessage(const std::string& method, |
| 197 const pp::VarDictionary& data); | 200 const pp::VarDictionary& data); |
| 198 | 201 |
| 199 // Same as above, but serializes messages to JSON before sending them. This | 202 // Same as above, but serializes messages to JSON before sending them. This |
| 200 // method is used for backward compatibility with older version of the webapp | 203 // method is used for backward compatibility with older version of the webapp |
| 201 // that expect to received most messages formatted using JSON. | 204 // that expect to received most messages formatted using JSON. |
| 202 // | 205 // |
| 203 // TODO(sergeyu): When all current versions of the webapp support raw messages | 206 // TODO(sergeyu): When all current versions of the webapp support raw messages |
| 204 // remove this method and use PostChromotingMessage() instead. | 207 // remove this method and use PostChromotingMessage() instead. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 272 |
| 270 // Weak reference to this instance, used for global logging and task posting. | 273 // Weak reference to this instance, used for global logging and task posting. |
| 271 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 274 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
| 272 | 275 |
| 273 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 276 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 } // namespace remoting | 279 } // namespace remoting |
| 277 | 280 |
| 278 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 281 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |