• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2019 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 #ifndef MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
12 #define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
13 
14 #include <memory>
15 #include "modules/desktop_capture/desktop_capturer.h"
16 #include "rtc_base/constructor_magic.h"
17 
18 namespace webrtc {
19 
20 // Base class for application specific handler to check criteria for switch to
21 // full-screen mode and find if possible the full-screen window to share.
22 // Supposed to be created and owned by platform specific
23 // FullScreenWindowDetector.
24 class FullScreenApplicationHandler {
25  public:
~FullScreenApplicationHandler()26   virtual ~FullScreenApplicationHandler() {}
27 
28   explicit FullScreenApplicationHandler(DesktopCapturer::SourceId sourceId);
29 
30   // Returns the full-screen window in place of the original window if all the
31   // criteria are met, or 0 if no such window found.
32   virtual DesktopCapturer::SourceId FindFullScreenWindow(
33       const DesktopCapturer::SourceList& window_list,
34       int64_t timestamp) const;
35 
36   // Returns source id of original window associated with
37   // FullScreenApplicationHandler
38   DesktopCapturer::SourceId GetSourceId() const;
39 
40  private:
41   const DesktopCapturer::SourceId source_id_;
42 
43   RTC_DISALLOW_COPY_AND_ASSIGN(FullScreenApplicationHandler);
44 };
45 
46 }  // namespace webrtc
47 
48 #endif  // MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
49