full_screen_application_handler.h 1.7 KB

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