| 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/me2me_desktop_environment.h" | 5 #include "remoting/host/me2me_desktop_environment.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "remoting/base/logging.h" | 9 #include "remoting/base/logging.h" |
| 10 #include "remoting/host/client_session_control.h" | 10 #include "remoting/host/client_session_control.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 33 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 scoped_ptr<ScreenControls> Me2MeDesktopEnvironment::CreateScreenControls() { | 36 scoped_ptr<ScreenControls> Me2MeDesktopEnvironment::CreateScreenControls() { |
| 37 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 37 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 38 | 38 |
| 39 return scoped_ptr<ScreenControls>( | 39 return scoped_ptr<ScreenControls>( |
| 40 new ResizingHostObserver(DesktopResizer::Create())); | 40 new ResizingHostObserver(DesktopResizer::Create())); |
| 41 } | 41 } |
| 42 | 42 |
| 43 scoped_ptr<webrtc::ScreenCapturer> | |
| 44 Me2MeDesktopEnvironment::CreateVideoCapturer() { | |
| 45 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | |
| 46 webrtc::DesktopCaptureOptions options = | |
| 47 webrtc::DesktopCaptureOptions::CreateDefault(); | |
| 48 options.set_use_update_notifications(true); | |
| 49 return scoped_ptr<webrtc::ScreenCapturer>( | |
| 50 webrtc::ScreenCapturer::Create(options)); | |
| 51 } | |
| 52 | |
| 53 std::string Me2MeDesktopEnvironment::GetCapabilities() const { | 43 std::string Me2MeDesktopEnvironment::GetCapabilities() const { |
| 54 return kRateLimitResizeRequests; | 44 return kRateLimitResizeRequests; |
| 55 } | 45 } |
| 56 | 46 |
| 57 Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( | 47 Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( |
| 58 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 48 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 59 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 49 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 60 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) | 50 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) |
| 61 : BasicDesktopEnvironment(caller_task_runner, | 51 : BasicDesktopEnvironment(caller_task_runner, |
| 62 input_task_runner, | 52 input_task_runner, |
| 63 ui_task_runner), | 53 ui_task_runner), |
| 64 gnubby_auth_enabled_(false) { | 54 gnubby_auth_enabled_(false) { |
| 65 DCHECK(caller_task_runner->BelongsToCurrentThread()); | 55 DCHECK(caller_task_runner->BelongsToCurrentThread()); |
| 56 desktop_capture_options()->set_use_update_notifications(true); |
| 66 } | 57 } |
| 67 | 58 |
| 68 scoped_ptr<GnubbyAuthHandler> Me2MeDesktopEnvironment::CreateGnubbyAuthHandler( | 59 scoped_ptr<GnubbyAuthHandler> Me2MeDesktopEnvironment::CreateGnubbyAuthHandler( |
| 69 protocol::ClientStub* client_stub) { | 60 protocol::ClientStub* client_stub) { |
| 70 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 61 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 71 | 62 |
| 72 if (gnubby_auth_enabled_) | 63 if (gnubby_auth_enabled_) |
| 73 return scoped_ptr<GnubbyAuthHandler>( | 64 return scoped_ptr<GnubbyAuthHandler>( |
| 74 GnubbyAuthHandler::Create(client_stub)); | 65 GnubbyAuthHandler::Create(client_stub)); |
| 75 | 66 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 160 |
| 170 curtain_enabled_ = enable; | 161 curtain_enabled_ = enable; |
| 171 } | 162 } |
| 172 | 163 |
| 173 void Me2MeDesktopEnvironmentFactory::SetEnableGnubbyAuth( | 164 void Me2MeDesktopEnvironmentFactory::SetEnableGnubbyAuth( |
| 174 bool gnubby_auth_enabled) { | 165 bool gnubby_auth_enabled) { |
| 175 gnubby_auth_enabled_ = gnubby_auth_enabled; | 166 gnubby_auth_enabled_ = gnubby_auth_enabled; |
| 176 } | 167 } |
| 177 | 168 |
| 178 } // namespace remoting | 169 } // namespace remoting |
| OLD | NEW |