| 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/desktop_session_proxy.h" | 5 #include "remoting/host/desktop_session_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 pending_capture_frame_requests_(0), | 103 pending_capture_frame_requests_(0), |
| 104 is_desktop_session_connected_(false), | 104 is_desktop_session_connected_(false), |
| 105 virtual_terminal_(virtual_terminal), | 105 virtual_terminal_(virtual_terminal), |
| 106 supports_touch_events_(supports_touch_events) { | 106 supports_touch_events_(supports_touch_events) { |
| 107 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 107 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() { | 110 std::unique_ptr<AudioCapturer> DesktopSessionProxy::CreateAudioCapturer() { |
| 111 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 111 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 112 | 112 |
| 113 return base::WrapUnique(new IpcAudioCapturer(this)); | 113 return base::MakeUnique<IpcAudioCapturer>(this); |
| 114 } | 114 } |
| 115 | 115 |
| 116 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() { | 116 std::unique_ptr<InputInjector> DesktopSessionProxy::CreateInputInjector() { |
| 117 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 117 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 118 | 118 |
| 119 return base::WrapUnique(new IpcInputInjector(this)); | 119 return base::MakeUnique<IpcInputInjector>(this); |
| 120 } | 120 } |
| 121 | 121 |
| 122 std::unique_ptr<ScreenControls> DesktopSessionProxy::CreateScreenControls() { | 122 std::unique_ptr<ScreenControls> DesktopSessionProxy::CreateScreenControls() { |
| 123 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 123 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 124 | 124 |
| 125 return base::WrapUnique(new IpcScreenControls(this)); | 125 return base::MakeUnique<IpcScreenControls>(this); |
| 126 } | 126 } |
| 127 | 127 |
| 128 std::unique_ptr<webrtc::DesktopCapturer> | 128 std::unique_ptr<webrtc::DesktopCapturer> |
| 129 DesktopSessionProxy::CreateVideoCapturer() { | 129 DesktopSessionProxy::CreateVideoCapturer() { |
| 130 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 130 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 131 | 131 |
| 132 return base::WrapUnique(new IpcVideoFrameCapturer(this)); | 132 return base::MakeUnique<IpcVideoFrameCapturer>(this); |
| 133 } | 133 } |
| 134 | 134 |
| 135 std::unique_ptr<webrtc::MouseCursorMonitor> | 135 std::unique_ptr<webrtc::MouseCursorMonitor> |
| 136 DesktopSessionProxy::CreateMouseCursorMonitor() { | 136 DesktopSessionProxy::CreateMouseCursorMonitor() { |
| 137 return base::WrapUnique(new IpcMouseCursorMonitor(this)); | 137 return base::MakeUnique<IpcMouseCursorMonitor>(this); |
| 138 } | 138 } |
| 139 | 139 |
| 140 std::string DesktopSessionProxy::GetCapabilities() const { | 140 std::string DesktopSessionProxy::GetCapabilities() const { |
| 141 std::string result = protocol::kRateLimitResizeRequests; | 141 std::string result = protocol::kRateLimitResizeRequests; |
| 142 // Ask the client to send its resolution unconditionally. | 142 // Ask the client to send its resolution unconditionally. |
| 143 if (virtual_terminal_) | 143 if (virtual_terminal_) |
| 144 result = result + " " + protocol::kSendInitialResolution; | 144 result = result + " " + protocol::kSendInitialResolution; |
| 145 | 145 |
| 146 if (supports_touch_events_) | 146 if (supports_touch_events_) |
| 147 result = result + " " + protocol::kTouchEventsCapability; | 147 result = result + " " + protocol::kTouchEventsCapability; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 } | 550 } |
| 551 | 551 |
| 552 // static | 552 // static |
| 553 void DesktopSessionProxyTraits::Destruct( | 553 void DesktopSessionProxyTraits::Destruct( |
| 554 const DesktopSessionProxy* desktop_session_proxy) { | 554 const DesktopSessionProxy* desktop_session_proxy) { |
| 555 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, | 555 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, |
| 556 desktop_session_proxy); | 556 desktop_session_proxy); |
| 557 } | 557 } |
| 558 | 558 |
| 559 } // namespace remoting | 559 } // namespace remoting |
| OLD | NEW |