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