Backed out changeset e7acb4e12051 (bug 1893666) for causing xpcshell failures on...
[gecko.git] / third_party / libwebrtc / modules / desktop_capture / full_screen_application_handler.h
blobb7e097a4745c441982a3bf06e927bccfb8e4fc14
1 /*
2 * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
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 */
11 #ifndef MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
12 #define MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_
14 #include <memory>
16 #include "modules/desktop_capture/desktop_capturer.h"
18 namespace webrtc {
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:
26 virtual ~FullScreenApplicationHandler() {}
28 FullScreenApplicationHandler(const FullScreenApplicationHandler&) = delete;
29 FullScreenApplicationHandler& operator=(const FullScreenApplicationHandler&) =
30 delete;
32 explicit FullScreenApplicationHandler(DesktopCapturer::SourceId sourceId);
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;
40 // Returns source id of original window associated with
41 // FullScreenApplicationHandler
42 DesktopCapturer::SourceId GetSourceId() const;
44 private:
45 const DesktopCapturer::SourceId source_id_;
48 } // namespace webrtc
50 #endif // MODULES_DESKTOP_CAPTURE_FULL_SCREEN_APPLICATION_HANDLER_H_