| 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/ipc_desktop_environment.h" | 5 #include "remoting/host/ipc_desktop_environment.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 87       io_task_runner_(io_task_runner), | 87       io_task_runner_(io_task_runner), | 
| 88       daemon_channel_(daemon_channel), | 88       daemon_channel_(daemon_channel), | 
| 89       connector_factory_(this) {} | 89       connector_factory_(this) {} | 
| 90 | 90 | 
| 91 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() {} | 91 IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() {} | 
| 92 | 92 | 
| 93 std::unique_ptr<DesktopEnvironment> IpcDesktopEnvironmentFactory::Create( | 93 std::unique_ptr<DesktopEnvironment> IpcDesktopEnvironmentFactory::Create( | 
| 94     base::WeakPtr<ClientSessionControl> client_session_control) { | 94     base::WeakPtr<ClientSessionControl> client_session_control) { | 
| 95   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 95   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 
| 96 | 96 | 
| 97   return base::WrapUnique(new IpcDesktopEnvironment( | 97   return base::MakeUnique<IpcDesktopEnvironment>( | 
| 98       audio_task_runner_, caller_task_runner_, io_task_runner_, | 98       audio_task_runner_, caller_task_runner_, io_task_runner_, | 
| 99       client_session_control, connector_factory_.GetWeakPtr(), curtain_enabled_, | 99       client_session_control, connector_factory_.GetWeakPtr(), curtain_enabled_, | 
| 100       supports_touch_events_)); | 100       supports_touch_events_); | 
| 101 } | 101 } | 
| 102 | 102 | 
| 103 void IpcDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { | 103 void IpcDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { | 
| 104   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 104   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 
| 105 | 105 | 
| 106   curtain_enabled_ = enable; | 106   curtain_enabled_ = enable; | 
| 107 } | 107 } | 
| 108 | 108 | 
| 109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const { | 109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const { | 
| 110   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 110   DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 202   if (i != active_connections_.end()) { | 202   if (i != active_connections_.end()) { | 
| 203     DesktopSessionProxy* desktop_session_proxy = i->second; | 203     DesktopSessionProxy* desktop_session_proxy = i->second; | 
| 204     active_connections_.erase(i); | 204     active_connections_.erase(i); | 
| 205 | 205 | 
| 206     // Disconnect the client session. | 206     // Disconnect the client session. | 
| 207     desktop_session_proxy->DisconnectSession(protocol::OK); | 207     desktop_session_proxy->DisconnectSession(protocol::OK); | 
| 208   } | 208   } | 
| 209 } | 209 } | 
| 210 | 210 | 
| 211 }  // namespace remoting | 211 }  // namespace remoting | 
| OLD | NEW | 
|---|