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 #include "remoting/host/basic_desktop_environment.h" | 5 #include "remoting/host/basic_desktop_environment.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "remoting/host/audio_capturer.h" | 10 #include "remoting/host/audio_capturer.h" |
11 #if defined(OS_CHROMEOS) | |
12 #include "remoting/host/chromeos/aura_desktop_capturer.h" | |
13 #endif // defined(OS_CHROMEOS) | |
Wez
2014/10/24 23:29:27
nit: Don't need the trailing comment for a single-
kelvinp
2014/10/29 01:22:51
Done.
| |
11 #include "remoting/host/client_session_control.h" | 14 #include "remoting/host/client_session_control.h" |
12 #include "remoting/host/gnubby_auth_handler.h" | 15 #include "remoting/host/gnubby_auth_handler.h" |
13 #include "remoting/host/input_injector.h" | 16 #include "remoting/host/input_injector.h" |
14 #include "remoting/host/screen_controls.h" | 17 #include "remoting/host/screen_controls.h" |
15 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 18 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
16 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | 19 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
17 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 20 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
18 | 21 |
19 namespace remoting { | 22 namespace remoting { |
20 | 23 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 | 58 |
56 scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler( | 59 scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler( |
57 protocol::ClientStub* client_stub) { | 60 protocol::ClientStub* client_stub) { |
58 return nullptr; | 61 return nullptr; |
59 } | 62 } |
60 | 63 |
61 scoped_ptr<webrtc::DesktopCapturer> | 64 scoped_ptr<webrtc::DesktopCapturer> |
62 BasicDesktopEnvironment::CreateVideoCapturer() { | 65 BasicDesktopEnvironment::CreateVideoCapturer() { |
63 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 66 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
64 | 67 |
68 #if defined(OS_CHROMEOS) | |
69 return scoped_ptr<webrtc::DesktopCapturer>(new AuraDesktopCapturer()); | |
70 #else // !defined(OS_CHROMEOS) | |
65 // The basic desktop environment does not use X DAMAGE, since it is | 71 // The basic desktop environment does not use X DAMAGE, since it is |
66 // broken on many systems - see http://crbug.com/73423. | 72 // broken on many systems - see http://crbug.com/73423. |
67 return make_scoped_ptr( | 73 return make_scoped_ptr( |
68 webrtc::ScreenCapturer::Create(*desktop_capture_options_)); | 74 webrtc::ScreenCapturer::Create(*desktop_capture_options_)); |
75 #endif // !defined(OS_CHROMEOS) | |
69 } | 76 } |
70 | 77 |
71 BasicDesktopEnvironment::BasicDesktopEnvironment( | 78 BasicDesktopEnvironment::BasicDesktopEnvironment( |
72 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 79 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
73 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 80 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
74 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) | 81 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) |
75 : caller_task_runner_(caller_task_runner), | 82 : caller_task_runner_(caller_task_runner), |
76 input_task_runner_(input_task_runner), | 83 input_task_runner_(input_task_runner), |
77 ui_task_runner_(ui_task_runner), | 84 ui_task_runner_(ui_task_runner), |
78 desktop_capture_options_( | 85 desktop_capture_options_( |
(...skipping 14 matching lines...) Expand all Loading... | |
93 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() { | 100 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() { |
94 } | 101 } |
95 | 102 |
96 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { | 103 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { |
97 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 104 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
98 | 105 |
99 return AudioCapturer::IsSupported(); | 106 return AudioCapturer::IsSupported(); |
100 } | 107 } |
101 | 108 |
102 } // namespace remoting | 109 } // namespace remoting |
OLD | NEW |