web_contents_modal_dialog_host.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2013 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 COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
  5. #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
  6. #include "components/web_modal/modal_dialog_host.h"
  7. #include "components/web_modal/web_modal_export.h"
  8. namespace gfx {
  9. class Size;
  10. }
  11. namespace web_modal {
  12. // Unlike browser modal dialogs, web contents modal dialogs should not be able
  13. // to draw outside the browser window. WebContentsModalDialogHost adds a
  14. // GetMaximumDialogSize method in order for positioning code to be able to take
  15. // this into account.
  16. class WEB_MODAL_EXPORT WebContentsModalDialogHost : public ModalDialogHost {
  17. public:
  18. ~WebContentsModalDialogHost() override;
  19. // Returns the maximum dimensions a dialog can have.
  20. virtual gfx::Size GetMaximumDialogSize() = 0;
  21. };
  22. } // namespace web_modal
  23. #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_