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