| 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 <utility> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 9 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 10 #include "remoting/base/logging.h" | 12 #include "remoting/base/logging.h" |
| 11 #include "remoting/host/client_session_control.h" | 13 #include "remoting/host/client_session_control.h" |
| 12 #include "remoting/host/curtain_mode.h" | 14 #include "remoting/host/curtain_mode.h" |
| 13 #include "remoting/host/desktop_resizer.h" | 15 #include "remoting/host/desktop_resizer.h" |
| 14 #include "remoting/host/gnubby_auth_handler.h" | 16 #include "remoting/host/gnubby_auth_handler.h" |
| 15 #include "remoting/host/host_window.h" | 17 #include "remoting/host/host_window.h" |
| 16 #include "remoting/host/host_window.h" | 18 #include "remoting/host/host_window.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // Create the disconnect window. | 112 // Create the disconnect window. |
| 111 if (want_user_interface) { | 113 if (want_user_interface) { |
| 112 // Create the local input monitor. | 114 // Create the local input monitor. |
| 113 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner(), | 115 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner(), |
| 114 input_task_runner(), | 116 input_task_runner(), |
| 115 ui_task_runner(), | 117 ui_task_runner(), |
| 116 client_session_control); | 118 client_session_control); |
| 117 | 119 |
| 118 disconnect_window_ = HostWindow::CreateDisconnectWindow(); | 120 disconnect_window_ = HostWindow::CreateDisconnectWindow(); |
| 119 disconnect_window_.reset(new HostWindowProxy( | 121 disconnect_window_.reset(new HostWindowProxy( |
| 120 caller_task_runner(), | 122 caller_task_runner(), ui_task_runner(), std::move(disconnect_window_))); |
| 121 ui_task_runner(), | |
| 122 disconnect_window_.Pass())); | |
| 123 disconnect_window_->Start(client_session_control); | 123 disconnect_window_->Start(client_session_control); |
| 124 } | 124 } |
| 125 | 125 |
| 126 return true; | 126 return true; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void Me2MeDesktopEnvironment::SetEnableGnubbyAuth(bool gnubby_auth_enabled) { | 129 void Me2MeDesktopEnvironment::SetEnableGnubbyAuth(bool gnubby_auth_enabled) { |
| 130 gnubby_auth_enabled_ = gnubby_auth_enabled; | 130 gnubby_auth_enabled_ = gnubby_auth_enabled; |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 151 new Me2MeDesktopEnvironment(caller_task_runner(), | 151 new Me2MeDesktopEnvironment(caller_task_runner(), |
| 152 input_task_runner(), | 152 input_task_runner(), |
| 153 ui_task_runner(), | 153 ui_task_runner(), |
| 154 supports_touch_events())); | 154 supports_touch_events())); |
| 155 if (!desktop_environment->InitializeSecurity(client_session_control, | 155 if (!desktop_environment->InitializeSecurity(client_session_control, |
| 156 curtain_enabled_)) { | 156 curtain_enabled_)) { |
| 157 return nullptr; | 157 return nullptr; |
| 158 } | 158 } |
| 159 desktop_environment->SetEnableGnubbyAuth(gnubby_auth_enabled_); | 159 desktop_environment->SetEnableGnubbyAuth(gnubby_auth_enabled_); |
| 160 | 160 |
| 161 return desktop_environment.Pass(); | 161 return std::move(desktop_environment); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void Me2MeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { | 164 void Me2MeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { |
| 165 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 165 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 166 | 166 |
| 167 curtain_enabled_ = enable; | 167 curtain_enabled_ = enable; |
| 168 } | 168 } |
| 169 | 169 |
| 170 void Me2MeDesktopEnvironmentFactory::SetEnableGnubbyAuth( | 170 void Me2MeDesktopEnvironmentFactory::SetEnableGnubbyAuth( |
| 171 bool gnubby_auth_enabled) { | 171 bool gnubby_auth_enabled) { |
| 172 gnubby_auth_enabled_ = gnubby_auth_enabled; | 172 gnubby_auth_enabled_ = gnubby_auth_enabled; |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace remoting | 175 } // namespace remoting |
| OLD | NEW |