| 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 // TODO(ajwong): We need to come up with a better description of the | 5 // TODO(ajwong): We need to come up with a better description of the |
| 6 // responsibilities for each thread. | 6 // responsibilities for each thread. |
| 7 | 7 |
| 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" | 26 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" |
| 27 #include "remoting/proto/event.pb.h" | 27 #include "remoting/proto/event.pb.h" |
| 28 #include "remoting/protocol/client_stub.h" | 28 #include "remoting/protocol/client_stub.h" |
| 29 #include "remoting/protocol/clipboard_stub.h" | 29 #include "remoting/protocol/clipboard_stub.h" |
| 30 #include "remoting/protocol/connection_to_host.h" | 30 #include "remoting/protocol/connection_to_host.h" |
| 31 #include "remoting/protocol/cursor_shape_stub.h" | 31 #include "remoting/protocol/cursor_shape_stub.h" |
| 32 #include "remoting/protocol/input_event_tracker.h" | 32 #include "remoting/protocol/input_event_tracker.h" |
| 33 #include "remoting/protocol/mouse_input_filter.h" | 33 #include "remoting/protocol/mouse_input_filter.h" |
| 34 #include "remoting/protocol/negotiating_client_authenticator.h" | 34 #include "remoting/protocol/negotiating_client_authenticator.h" |
| 35 #include "remoting/protocol/third_party_client_authenticator.h" | 35 #include "remoting/protocol/third_party_client_authenticator.h" |
| 36 #include "third_party/skia/include/core/SkPoint.h" | |
| 37 #include "third_party/skia/include/core/SkRegion.h" | |
| 38 #include "third_party/skia/include/core/SkSize.h" | |
| 39 | 36 |
| 40 namespace base { | 37 namespace base { |
| 41 class DictionaryValue; | 38 class DictionaryValue; |
| 42 } // namespace base | 39 } // namespace base |
| 43 | 40 |
| 44 namespace pp { | 41 namespace pp { |
| 45 class InputEvent; | 42 class InputEvent; |
| 46 class Module; | 43 class Module; |
| 47 } // namespace pp | 44 } // namespace pp |
| 48 | 45 |
| 46 namespace webrtc { |
| 47 class DesktopRegion; |
| 48 class DesktopSize; |
| 49 class DesktopVector; |
| 50 } // namespace webrtc |
| 51 |
| 49 namespace remoting { | 52 namespace remoting { |
| 50 | 53 |
| 51 class ChromotingClient; | 54 class ChromotingClient; |
| 52 class ChromotingStats; | 55 class ChromotingStats; |
| 53 class ClientContext; | 56 class ClientContext; |
| 54 class DelegatingSignalStrategy; | 57 class DelegatingSignalStrategy; |
| 55 class FrameConsumer; | 58 class FrameConsumer; |
| 56 class FrameConsumerProxy; | 59 class FrameConsumerProxy; |
| 57 class PepperAudioPlayer; | 60 class PepperAudioPlayer; |
| 58 class PepperTokenFetcher; | 61 class PepperTokenFetcher; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 128 |
| 126 // protocol::ClipboardStub interface. | 129 // protocol::ClipboardStub interface. |
| 127 virtual void InjectClipboardEvent( | 130 virtual void InjectClipboardEvent( |
| 128 const protocol::ClipboardEvent& event) OVERRIDE; | 131 const protocol::ClipboardEvent& event) OVERRIDE; |
| 129 | 132 |
| 130 // protocol::CursorShapeStub interface. | 133 // protocol::CursorShapeStub interface. |
| 131 virtual void SetCursorShape( | 134 virtual void SetCursorShape( |
| 132 const protocol::CursorShapeInfo& cursor_shape) OVERRIDE; | 135 const protocol::CursorShapeInfo& cursor_shape) OVERRIDE; |
| 133 | 136 |
| 134 // Called by PepperView. | 137 // Called by PepperView. |
| 135 void SetDesktopSize(const SkISize& size, const SkIPoint& dpi); | 138 void SetDesktopSize(const webrtc::DesktopSize& size, |
| 136 void SetDesktopShape(const SkRegion& shape); | 139 const webrtc::DesktopVector& dpi); |
| 140 void SetDesktopShape(const webrtc::DesktopRegion& shape); |
| 137 void OnFirstFrameReceived(); | 141 void OnFirstFrameReceived(); |
| 138 | 142 |
| 139 // Return statistics record by ChromotingClient. | 143 // Return statistics record by ChromotingClient. |
| 140 // If no connection is currently active then NULL will be returned. | 144 // If no connection is currently active then NULL will be returned. |
| 141 ChromotingStats* GetStats(); | 145 ChromotingStats* GetStats(); |
| 142 | 146 |
| 143 // Registers a global log message handler that redirects the log output to | 147 // Registers a global log message handler that redirects the log output to |
| 144 // our plugin instance. | 148 // our plugin instance. |
| 145 // This is called by the plugin's PPP_InitializeModule. | 149 // This is called by the plugin's PPP_InitializeModule. |
| 146 // Note that no logging will be processed unless a ChromotingInstance has been | 150 // Note that no logging will be processed unless a ChromotingInstance has been |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 236 |
| 233 PepperPluginThreadDelegate plugin_thread_delegate_; | 237 PepperPluginThreadDelegate plugin_thread_delegate_; |
| 234 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 238 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
| 235 ClientContext context_; | 239 ClientContext context_; |
| 236 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; | 240 scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_; |
| 237 scoped_ptr<PepperView> view_; | 241 scoped_ptr<PepperView> view_; |
| 238 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; | 242 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; |
| 239 pp::View plugin_view_; | 243 pp::View plugin_view_; |
| 240 | 244 |
| 241 // Contains the most-recently-reported desktop shape, if any. | 245 // Contains the most-recently-reported desktop shape, if any. |
| 242 scoped_ptr<SkRegion> desktop_shape_; | 246 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; |
| 243 | 247 |
| 244 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; | 248 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; |
| 245 | 249 |
| 246 scoped_ptr<protocol::ConnectionToHost> host_connection_; | 250 scoped_ptr<protocol::ConnectionToHost> host_connection_; |
| 247 scoped_ptr<ChromotingClient> client_; | 251 scoped_ptr<ChromotingClient> client_; |
| 248 | 252 |
| 249 // Input pipeline components, in reverse order of distance from input source. | 253 // Input pipeline components, in reverse order of distance from input source. |
| 250 protocol::MouseInputFilter mouse_input_filter_; | 254 protocol::MouseInputFilter mouse_input_filter_; |
| 251 protocol::InputEventTracker input_tracker_; | 255 protocol::InputEventTracker input_tracker_; |
| 252 KeyEventMapper key_mapper_; | 256 KeyEventMapper key_mapper_; |
| 253 scoped_ptr<protocol::InputFilter> normalizing_input_filter_; | 257 scoped_ptr<protocol::InputFilter> normalizing_input_filter_; |
| 254 PepperInputHandler input_handler_; | 258 PepperInputHandler input_handler_; |
| 255 | 259 |
| 256 // PIN Fetcher. | 260 // PIN Fetcher. |
| 257 bool use_async_pin_dialog_; | 261 bool use_async_pin_dialog_; |
| 258 protocol::SecretFetchedCallback secret_fetched_callback_; | 262 protocol::SecretFetchedCallback secret_fetched_callback_; |
| 259 | 263 |
| 260 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_; | 264 base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_; |
| 261 | 265 |
| 262 // Weak reference to this instance, used for global logging and task posting. | 266 // Weak reference to this instance, used for global logging and task posting. |
| 263 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 267 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
| 264 | 268 |
| 265 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 269 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 266 }; | 270 }; |
| 267 | 271 |
| 268 } // namespace remoting | 272 } // namespace remoting |
| 269 | 273 |
| 270 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 274 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |