tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

desktop_capturer_wrapper.cc (1982B)


      1 /*
      2 *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
      3 *
      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
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #include "modules/desktop_capture/desktop_capturer_wrapper.h"
     12 
     13 #include <memory>
     14 #include <utility>
     15 
     16 #include "modules/desktop_capture/desktop_capture_types.h"
     17 #include "modules/desktop_capture/desktop_capturer.h"
     18 #include "modules/desktop_capture/desktop_geometry.h"
     19 #include "modules/desktop_capture/shared_memory.h"
     20 #include "rtc_base/checks.h"
     21 
     22 namespace webrtc {
     23 
     24 DesktopCapturerWrapper::DesktopCapturerWrapper(
     25    std::unique_ptr<DesktopCapturer> base_capturer)
     26    : base_capturer_(std::move(base_capturer)) {
     27  RTC_DCHECK(base_capturer_);
     28 }
     29 
     30 DesktopCapturerWrapper::~DesktopCapturerWrapper() = default;
     31 
     32 void DesktopCapturerWrapper::Start(Callback* callback) {
     33  base_capturer_->Start(callback);
     34 }
     35 
     36 void DesktopCapturerWrapper::SetSharedMemoryFactory(
     37    std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {
     38  base_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory));
     39 }
     40 
     41 void DesktopCapturerWrapper::CaptureFrame() {
     42  base_capturer_->CaptureFrame();
     43 }
     44 
     45 void DesktopCapturerWrapper::SetExcludedWindow(WindowId window) {
     46  base_capturer_->SetExcludedWindow(window);
     47 }
     48 
     49 bool DesktopCapturerWrapper::GetSourceList(SourceList* sources) {
     50  return base_capturer_->GetSourceList(sources);
     51 }
     52 
     53 bool DesktopCapturerWrapper::SelectSource(SourceId id) {
     54  return base_capturer_->SelectSource(id);
     55 }
     56 
     57 bool DesktopCapturerWrapper::FocusOnSelectedSource() {
     58  return base_capturer_->FocusOnSelectedSource();
     59 }
     60 
     61 bool DesktopCapturerWrapper::IsOccluded(const DesktopVector& pos) {
     62  return base_capturer_->IsOccluded(pos);
     63 }
     64 
     65 }  // namespace webrtc