| 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/logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "remoting/proto/control.pb.h" | 18 #include "remoting/proto/control.pb.h" |
| 19 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 19 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 20 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
| 20 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 21 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 21 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 22 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
| 22 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | |
| 23 | 23 |
| 24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 25 #include "remoting/host/chromeos/aura_desktop_capturer.h" | 25 #include "remoting/host/chromeos/aura_desktop_capturer.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 namespace remoting { | 28 namespace remoting { |
| 29 | 29 |
| 30 class DesktopCapturerProxy::Core : public webrtc::DesktopCapturer::Callback { | 30 class DesktopCapturerProxy::Core : public webrtc::DesktopCapturer::Callback { |
| 31 public: | 31 public: |
| 32 explicit Core(base::WeakPtr<DesktopCapturerProxy> proxy); | 32 explicit Core(base::WeakPtr<DesktopCapturerProxy> proxy); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 void DesktopCapturerProxy::OnFrameCaptured( | 180 void DesktopCapturerProxy::OnFrameCaptured( |
| 181 webrtc::DesktopCapturer::Result result, | 181 webrtc::DesktopCapturer::Result result, |
| 182 std::unique_ptr<webrtc::DesktopFrame> frame) { | 182 std::unique_ptr<webrtc::DesktopFrame> frame) { |
| 183 DCHECK(thread_checker_.CalledOnValidThread()); | 183 DCHECK(thread_checker_.CalledOnValidThread()); |
| 184 | 184 |
| 185 callback_->OnCaptureResult(result, std::move(frame)); | 185 callback_->OnCaptureResult(result, std::move(frame)); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace remoting | 188 } // namespace remoting |
| OLD | NEW |