OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ | 5 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ |
6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ | 6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ |
7 | 7 |
8 #include "components/web_modal/modal_dialog_host.h" | 8 #include "components/web_modal/modal_dialog_host.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 class Size; | 11 class Size; |
12 } | 12 } |
13 | 13 |
14 namespace web_modal { | 14 namespace web_modal { |
15 | 15 |
16 // Unlike browser modal dialogs, web contents modal dialogs should not be able | 16 // Unlike browser modal dialogs, web contents modal dialogs should not be able |
17 // to draw outside the browser window. WebContentsModalDialogHost adds a | 17 // to draw outside the browser window. WebContentsModalDialogHost adds a |
18 // GetMaximumDialogSize method in order for positioning code to be able to take | 18 // GetMaximumDialogSize method in order for positioning code to be able to take |
19 // this into account. | 19 // this into account. |
20 class WebContentsModalDialogHost : public ModalDialogHost { | 20 class WebContentsModalDialogHost : public ModalDialogHost { |
21 public: | 21 public: |
22 virtual ~WebContentsModalDialogHost(); | 22 ~WebContentsModalDialogHost() override; |
23 | 23 |
24 // Returns the maximum dimensions a dialog can have. | 24 // Returns the maximum dimensions a dialog can have. |
25 virtual gfx::Size GetMaximumDialogSize() = 0; | 25 virtual gfx::Size GetMaximumDialogSize() = 0; |
26 }; | 26 }; |
27 | 27 |
28 } // namespace web_modal | 28 } // namespace web_modal |
29 | 29 |
30 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ | 30 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_HOST_H_ |
OLD | NEW |