OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_capturer_proxy.h" | 5 #include "remoting/host/desktop_capturer_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 DCHECK(thread_checker_.CalledOnValidThread()); | 78 DCHECK(thread_checker_.CalledOnValidThread()); |
79 if (capturer_) | 79 if (capturer_) |
80 capturer_->Start(this); | 80 capturer_->Start(this); |
81 } | 81 } |
82 | 82 |
83 void DesktopCapturerProxy::Core::SetSharedMemoryFactory( | 83 void DesktopCapturerProxy::Core::SetSharedMemoryFactory( |
84 std::unique_ptr<webrtc::SharedMemoryFactory> shared_memory_factory) { | 84 std::unique_ptr<webrtc::SharedMemoryFactory> shared_memory_factory) { |
85 DCHECK(thread_checker_.CalledOnValidThread()); | 85 DCHECK(thread_checker_.CalledOnValidThread()); |
86 if (capturer_) { | 86 if (capturer_) { |
87 capturer_->SetSharedMemoryFactory( | 87 capturer_->SetSharedMemoryFactory( |
88 rtc_make_scoped_ptr(shared_memory_factory.release())); | 88 rtc::scoped_ptr<webrtc::SharedMemoryFactory>( |
| 89 shared_memory_factory.release())); |
89 } | 90 } |
90 } | 91 } |
91 | 92 |
92 void DesktopCapturerProxy::Core::Capture(const webrtc::DesktopRegion& rect) { | 93 void DesktopCapturerProxy::Core::Capture(const webrtc::DesktopRegion& rect) { |
93 DCHECK(thread_checker_.CalledOnValidThread()); | 94 DCHECK(thread_checker_.CalledOnValidThread()); |
94 if (capturer_) { | 95 if (capturer_) { |
95 capturer_->Capture(rect); | 96 capturer_->Capture(rect); |
96 } else { | 97 } else { |
97 OnCaptureCompleted(nullptr); | 98 OnCaptureCompleted(nullptr); |
98 } | 99 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 154 } |
154 | 155 |
155 void DesktopCapturerProxy::OnFrameCaptured( | 156 void DesktopCapturerProxy::OnFrameCaptured( |
156 std::unique_ptr<webrtc::DesktopFrame> frame) { | 157 std::unique_ptr<webrtc::DesktopFrame> frame) { |
157 DCHECK(thread_checker_.CalledOnValidThread()); | 158 DCHECK(thread_checker_.CalledOnValidThread()); |
158 | 159 |
159 callback_->OnCaptureCompleted(frame.release()); | 160 callback_->OnCaptureCompleted(frame.release()); |
160 } | 161 } |
161 | 162 |
162 } // namespace remoting | 163 } // namespace remoting |
OLD | NEW |