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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/logging.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "remoting/proto/control.pb.h" | 18 #include "remoting/proto/control.pb.h" |
18 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 19 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
19 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 20 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
20 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 21 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
21 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | 22 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
22 | 23 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 DCHECK(thread_checker_.CalledOnValidThread()); | 160 DCHECK(thread_checker_.CalledOnValidThread()); |
160 | 161 |
161 // Start() must be called before Capture(). | 162 // Start() must be called before Capture(). |
162 DCHECK(callback_); | 163 DCHECK(callback_); |
163 | 164 |
164 capture_task_runner_->PostTask( | 165 capture_task_runner_->PostTask( |
165 FROM_HERE, | 166 FROM_HERE, |
166 base::Bind(&Core::CaptureFrame, base::Unretained(core_.get()))); | 167 base::Bind(&Core::CaptureFrame, base::Unretained(core_.get()))); |
167 } | 168 } |
168 | 169 |
| 170 bool DesktopCapturerProxy::GetSourceList(SourceList* sources) { |
| 171 NOTIMPLEMENTED(); |
| 172 return false; |
| 173 } |
| 174 |
| 175 bool DesktopCapturerProxy::SelectSource(SourceId id) { |
| 176 NOTIMPLEMENTED(); |
| 177 return false; |
| 178 } |
| 179 |
169 void DesktopCapturerProxy::OnFrameCaptured( | 180 void DesktopCapturerProxy::OnFrameCaptured( |
170 webrtc::DesktopCapturer::Result result, | 181 webrtc::DesktopCapturer::Result result, |
171 std::unique_ptr<webrtc::DesktopFrame> frame) { | 182 std::unique_ptr<webrtc::DesktopFrame> frame) { |
172 DCHECK(thread_checker_.CalledOnValidThread()); | 183 DCHECK(thread_checker_.CalledOnValidThread()); |
173 | 184 |
174 callback_->OnCaptureResult(result, std::move(frame)); | 185 callback_->OnCaptureResult(result, std::move(frame)); |
175 } | 186 } |
176 | 187 |
177 } // namespace remoting | 188 } // namespace remoting |
OLD | NEW |