| 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 #include "remoting/host/client_session_control.h" | 11 #include "remoting/host/client_session_control.h" |
| 12 #include "remoting/host/gnubby_auth_handler.h" |
| 12 #include "remoting/host/input_injector.h" | 13 #include "remoting/host/input_injector.h" |
| 13 #include "remoting/host/screen_controls.h" | 14 #include "remoting/host/screen_controls.h" |
| 14 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 15 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
| 15 | 16 |
| 16 namespace remoting { | 17 namespace remoting { |
| 17 | 18 |
| 18 BasicDesktopEnvironment::~BasicDesktopEnvironment() { | 19 BasicDesktopEnvironment::~BasicDesktopEnvironment() { |
| 19 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 20 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 37 return scoped_ptr<ScreenControls>(); | 38 return scoped_ptr<ScreenControls>(); |
| 38 } | 39 } |
| 39 | 40 |
| 40 std::string BasicDesktopEnvironment::GetCapabilities() const { | 41 std::string BasicDesktopEnvironment::GetCapabilities() const { |
| 41 return std::string(); | 42 return std::string(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) { | 45 void BasicDesktopEnvironment::SetCapabilities(const std::string& capabilities) { |
| 45 } | 46 } |
| 46 | 47 |
| 48 scoped_ptr<GnubbyAuthHandler> BasicDesktopEnvironment::CreateGnubbyAuthHandler( |
| 49 protocol::ClientStub* client_stub) { |
| 50 return scoped_ptr<GnubbyAuthHandler>(); |
| 51 } |
| 52 |
| 47 scoped_ptr<webrtc::ScreenCapturer> | 53 scoped_ptr<webrtc::ScreenCapturer> |
| 48 BasicDesktopEnvironment::CreateVideoCapturer() { | 54 BasicDesktopEnvironment::CreateVideoCapturer() { |
| 49 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 55 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 50 | 56 |
| 51 // The basic desktop environment does not use X DAMAGE, since it is | 57 // The basic desktop environment does not use X DAMAGE, since it is |
| 52 // broken on many systems - see http://crbug.com/73423. | 58 // broken on many systems - see http://crbug.com/73423. |
| 53 return scoped_ptr<webrtc::ScreenCapturer>(webrtc::ScreenCapturer::Create()); | 59 return scoped_ptr<webrtc::ScreenCapturer>(webrtc::ScreenCapturer::Create()); |
| 54 } | 60 } |
| 55 | 61 |
| 56 BasicDesktopEnvironment::BasicDesktopEnvironment( | 62 BasicDesktopEnvironment::BasicDesktopEnvironment( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 75 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() { | 81 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() { |
| 76 } | 82 } |
| 77 | 83 |
| 78 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { | 84 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { |
| 79 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 85 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 80 | 86 |
| 81 return AudioCapturer::IsSupported(); | 87 return AudioCapturer::IsSupported(); |
| 82 } | 88 } |
| 83 | 89 |
| 84 } // namespace remoting | 90 } // namespace remoting |
| OLD | NEW |