| 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 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/thread_task_runner_handle.h" | |
| 17 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
| 18 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
| 19 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
| 20 #include "ppapi/cpp/instance.h" | 19 #include "ppapi/cpp/instance.h" |
| 21 #include "ppapi/cpp/var.h" | 20 #include "ppapi/cpp/var.h" |
| 22 #include "remoting/client/client_context.h" | 21 #include "remoting/client/client_context.h" |
| 23 #include "remoting/client/client_user_interface.h" | 22 #include "remoting/client/client_user_interface.h" |
| 24 #include "remoting/client/key_event_mapper.h" | 23 #include "remoting/client/key_event_mapper.h" |
| 25 #include "remoting/client/plugin/media_source_video_renderer.h" | 24 #include "remoting/client/plugin/media_source_video_renderer.h" |
| 26 #include "remoting/client/plugin/normalizing_input_filter.h" | 25 #include "remoting/client/plugin/normalizing_input_filter.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 namespace base { | 38 namespace base { |
| 40 class DictionaryValue; | 39 class DictionaryValue; |
| 41 } // namespace base | 40 } // namespace base |
| 42 | 41 |
| 43 namespace pp { | 42 namespace pp { |
| 44 class InputEvent; | 43 class InputEvent; |
| 45 class Module; | 44 class Module; |
| 46 class VarDictionary; | 45 class VarDictionary; |
| 47 } // namespace pp | 46 } // namespace pp |
| 48 | 47 |
| 49 namespace jingle_glue { | |
| 50 class JingleThreadWrapper; | |
| 51 } // namespace jingle_glue | |
| 52 | |
| 53 namespace webrtc { | 48 namespace webrtc { |
| 54 class DesktopRegion; | 49 class DesktopRegion; |
| 55 class DesktopSize; | 50 class DesktopSize; |
| 56 class DesktopVector; | 51 class DesktopVector; |
| 57 } // namespace webrtc | 52 } // namespace webrtc |
| 58 | 53 |
| 59 namespace remoting { | 54 namespace remoting { |
| 60 | 55 |
| 61 class ChromotingClient; | 56 class ChromotingClient; |
| 62 class ChromotingStats; | 57 class ChromotingStats; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 virtual void OnMediaSourceSize(const webrtc::DesktopSize& size, | 252 virtual void OnMediaSourceSize(const webrtc::DesktopSize& size, |
| 258 const webrtc::DesktopVector& dpi) OVERRIDE; | 253 const webrtc::DesktopVector& dpi) OVERRIDE; |
| 259 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) OVERRIDE; | 254 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) OVERRIDE; |
| 260 virtual void OnMediaSourceReset(const std::string& format) OVERRIDE; | 255 virtual void OnMediaSourceReset(const std::string& format) OVERRIDE; |
| 261 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size) OVERRIDE; | 256 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size) OVERRIDE; |
| 262 | 257 |
| 263 bool initialized_; | 258 bool initialized_; |
| 264 | 259 |
| 265 PepperPluginThreadDelegate plugin_thread_delegate_; | 260 PepperPluginThreadDelegate plugin_thread_delegate_; |
| 266 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 261 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
| 267 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; | |
| 268 scoped_ptr<jingle_glue::JingleThreadWrapper> thread_wrapper_; | |
| 269 ClientContext context_; | 262 ClientContext context_; |
| 270 scoped_ptr<VideoRenderer> video_renderer_; | 263 scoped_ptr<VideoRenderer> video_renderer_; |
| 271 scoped_ptr<PepperView> view_; | 264 scoped_ptr<PepperView> view_; |
| 272 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; | 265 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; |
| 273 pp::View plugin_view_; | 266 pp::View plugin_view_; |
| 274 | 267 |
| 275 // Contains the most-recently-reported desktop shape, if any. | 268 // Contains the most-recently-reported desktop shape, if any. |
| 276 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; | 269 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; |
| 277 | 270 |
| 278 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; | 271 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 300 | 293 |
| 301 // Weak reference to this instance, used for global logging and task posting. | 294 // Weak reference to this instance, used for global logging and task posting. |
| 302 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 295 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
| 303 | 296 |
| 304 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 297 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 305 }; | 298 }; |
| 306 | 299 |
| 307 } // namespace remoting | 300 } // namespace remoting |
| 308 | 301 |
| 309 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 302 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |