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 12 matching lines...) Expand all Loading... |
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 class VarDictionary; | 46 class VarDictionary; |
46 } // namespace pp | 47 } // namespace pp |
47 | 48 |
| 49 namespace jingle_glue { |
| 50 class JingleThreadWrapper; |
| 51 } // namespace jingle_glue |
| 52 |
48 namespace webrtc { | 53 namespace webrtc { |
49 class DesktopRegion; | 54 class DesktopRegion; |
50 class DesktopSize; | 55 class DesktopSize; |
51 class DesktopVector; | 56 class DesktopVector; |
52 } // namespace webrtc | 57 } // namespace webrtc |
53 | 58 |
54 namespace remoting { | 59 namespace remoting { |
55 | 60 |
56 class ChromotingClient; | 61 class ChromotingClient; |
57 class ChromotingStats; | 62 class ChromotingStats; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 virtual void OnMediaSourceSize(const webrtc::DesktopSize& size, | 257 virtual void OnMediaSourceSize(const webrtc::DesktopSize& size, |
253 const webrtc::DesktopVector& dpi) OVERRIDE; | 258 const webrtc::DesktopVector& dpi) OVERRIDE; |
254 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) OVERRIDE; | 259 virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) OVERRIDE; |
255 virtual void OnMediaSourceReset(const std::string& format) OVERRIDE; | 260 virtual void OnMediaSourceReset(const std::string& format) OVERRIDE; |
256 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size) OVERRIDE; | 261 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size) OVERRIDE; |
257 | 262 |
258 bool initialized_; | 263 bool initialized_; |
259 | 264 |
260 PepperPluginThreadDelegate plugin_thread_delegate_; | 265 PepperPluginThreadDelegate plugin_thread_delegate_; |
261 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 266 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
| 267 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; |
| 268 scoped_ptr<jingle_glue::JingleThreadWrapper> thread_wrapper_; |
262 ClientContext context_; | 269 ClientContext context_; |
263 scoped_ptr<VideoRenderer> video_renderer_; | 270 scoped_ptr<VideoRenderer> video_renderer_; |
264 scoped_ptr<PepperView> view_; | 271 scoped_ptr<PepperView> view_; |
265 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; | 272 scoped_ptr<base::WeakPtrFactory<FrameConsumer> > view_weak_factory_; |
266 pp::View plugin_view_; | 273 pp::View plugin_view_; |
267 | 274 |
268 // Contains the most-recently-reported desktop shape, if any. | 275 // Contains the most-recently-reported desktop shape, if any. |
269 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; | 276 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; |
270 | 277 |
271 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; | 278 scoped_ptr<DelegatingSignalStrategy> signal_strategy_; |
(...skipping 21 matching lines...) Expand all Loading... |
293 | 300 |
294 // Weak reference to this instance, used for global logging and task posting. | 301 // Weak reference to this instance, used for global logging and task posting. |
295 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 302 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
296 | 303 |
297 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 304 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
298 }; | 305 }; |
299 | 306 |
300 } // namespace remoting | 307 } // namespace remoting |
301 | 308 |
302 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 309 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
OLD | NEW |