| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 DesktopAndCursorComposer::~DesktopAndCursorComposer() {} | 131 DesktopAndCursorComposer::~DesktopAndCursorComposer() {} |
| 132 | 132 |
| 133 void DesktopAndCursorComposer::Start(DesktopCapturer::Callback* callback) { | 133 void DesktopAndCursorComposer::Start(DesktopCapturer::Callback* callback) { |
| 134 callback_ = callback; | 134 callback_ = callback; |
| 135 if (mouse_monitor_.get()) | 135 if (mouse_monitor_.get()) |
| 136 mouse_monitor_->Init(this, MouseCursorMonitor::SHAPE_AND_POSITION); | 136 mouse_monitor_->Init(this, MouseCursorMonitor::SHAPE_AND_POSITION); |
| 137 desktop_capturer_->Start(this); | 137 desktop_capturer_->Start(this); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void DesktopAndCursorComposer::SetSharedMemoryFactory( | 140 void DesktopAndCursorComposer::SetSharedMemoryFactory( |
| 141 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { | 141 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) { |
| 142 desktop_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory)); | 142 desktop_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory)); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void DesktopAndCursorComposer::Capture(const DesktopRegion& region) { | 145 void DesktopAndCursorComposer::Capture(const DesktopRegion& region) { |
| 146 if (mouse_monitor_.get()) | 146 if (mouse_monitor_.get()) |
| 147 mouse_monitor_->Capture(); | 147 mouse_monitor_->Capture(); |
| 148 desktop_capturer_->Capture(region); | 148 desktop_capturer_->Capture(region); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void DesktopAndCursorComposer::SetExcludedWindow(WindowId window) { | 151 void DesktopAndCursorComposer::SetExcludedWindow(WindowId window) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 167 } | 167 } |
| 168 | 168 |
| 169 void DesktopAndCursorComposer::OnMouseCursorPosition( | 169 void DesktopAndCursorComposer::OnMouseCursorPosition( |
| 170 MouseCursorMonitor::CursorState state, | 170 MouseCursorMonitor::CursorState state, |
| 171 const DesktopVector& position) { | 171 const DesktopVector& position) { |
| 172 cursor_state_ = state; | 172 cursor_state_ = state; |
| 173 cursor_position_ = position; | 173 cursor_position_ = position; |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace webrtc | 176 } // namespace webrtc |
| OLD | NEW |