system_modal_extension.h 950 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_PLATFORM_WINDOW_EXTENSIONS_SYSTEM_MODAL_EXTENSION_H_
  5. #define UI_PLATFORM_WINDOW_EXTENSIONS_SYSTEM_MODAL_EXTENSION_H_
  6. #include "base/component_export.h"
  7. namespace ui {
  8. class PlatformWindow;
  9. class COMPONENT_EXPORT(PLATFORM_WINDOW) SystemModalExtension {
  10. public:
  11. virtual void SetSystemModal(bool modal) = 0;
  12. protected:
  13. virtual ~SystemModalExtension();
  14. // Sets the pointer to the extension as a property of the PlatformWindow.
  15. static void SetSystemModalExtension(PlatformWindow* window,
  16. SystemModalExtension* extension);
  17. };
  18. COMPONENT_EXPORT(PLATFORM_WINDOW)
  19. SystemModalExtension* GetSystemModalExtension(const PlatformWindow& window);
  20. } // namespace ui
  21. #endif // UI_PLATFORM_WINDOW_EXTENSIONS_SYSTEM_MODAL_EXTENSION_H_