• 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 
16 #include "modules/desktop_capture/desktop_capturer.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   FullScreenApplicationHandler(const FullScreenApplicationHandler&) = delete;
29   FullScreenApplicationHandler& operator=(const FullScreenApplicationHandler&) =
30       delete;
31 
32   explicit FullScreenApplicationHandler(DesktopCapturer::SourceId sourceId);
33 
34   // Returns the full-screen window in place of the original window if all the
35   // criteria are met, or 0 if no such window found.
36   virtual DesktopCapturer::SourceId FindFullScreenWindow(
37       const DesktopCapturer::SourceList& window_list,
38       int64_t timestamp) const;
39 
40   // Returns source id of original window associated with
41   // FullScreenApplicationHandler
42   DesktopCapturer::SourceId GetSourceId() const;
43 
44  private:
45   const DesktopCapturer::SourceId source_id_;
46 };
47 
48 }  // namespace webrtc
49 
50 #endif  // MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
51