| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ | 5 #ifndef COMPONENTS_WEB_MODAL_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ |
| 6 #define COMPONENTS_WEB_MODAL_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ | 6 #define COMPONENTS_WEB_MODAL_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class WebContents; | 12 class WebContents; |
| 13 } // namespace content | 13 } // namespace content |
| 14 | 14 |
| 15 namespace web_modal { | 15 namespace web_modal { |
| 16 | 16 |
| 17 class WebContentsModalDialogHost; | 17 class WebContentsModalDialogHost; |
| 18 | 18 |
| 19 // Interface from SingleWebContentsDialogManager to | 19 // Interface from SingleWebContentsDialogManager to |
| 20 // WebContentsModalDialogManager. | 20 // WebContentsModalDialogManager. |
| 21 class SingleWebContentsDialogManagerDelegate { | 21 class SingleWebContentsDialogManagerDelegate { |
| 22 public: | 22 public: |
| 23 SingleWebContentsDialogManagerDelegate() {} | 23 SingleWebContentsDialogManagerDelegate() {} |
| 24 virtual ~SingleWebContentsDialogManagerDelegate() {} | 24 virtual ~SingleWebContentsDialogManagerDelegate() {} |
| 25 | 25 |
| 26 virtual content::WebContents* GetWebContents() const = 0; | 26 virtual content::WebContents* GetWebContents() const = 0; |
| 27 | 27 |
| 28 // Notify the delegate that the dialog is closing. The native | 28 // Notifies the delegate that the dialog is closing. The native |
| 29 // manager will be deleted before the end of this call. | 29 // manager will be deleted before the end of this call. |
| 30 virtual void WillClose(gfx::NativeWindow dialog) = 0; | 30 virtual void WillClose(gfx::NativeWindow dialog) = 0; |
| 31 | 31 |
| 32 // Checks if the dialog should have a non clipped display (bounds not |
| 33 // constrained to modal parent). |
| 34 virtual bool IsNonClipped(gfx::NativeWindow dialog) const = 0; |
| 35 |
| 32 private: | 36 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerDelegate); |
| 34 }; | 38 }; |
| 35 | 39 |
| 36 // Provides an interface for platform-specific UI implementation for the web | 40 // Provides an interface for platform-specific UI implementation for the web |
| 37 // contents modal dialog. Each object will manage a single dialog window | 41 // contents modal dialog. Each object will manage a single dialog window |
| 38 // during its lifecycle. | 42 // during its lifecycle. |
| 39 // | 43 // |
| 40 // Implementation classes should accept a dialog window at construction time | 44 // Implementation classes should accept a dialog window at construction time |
| 41 // and register to be notified when the dialog is closing, so that it can | 45 // and register to be notified when the dialog is closing, so that it can |
| (...skipping 29 matching lines...) Expand all Loading... |
| 71 protected: | 75 protected: |
| 72 SingleWebContentsDialogManager() {} | 76 SingleWebContentsDialogManager() {} |
| 73 | 77 |
| 74 private: | 78 private: |
| 75 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManager); | 79 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManager); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace web_modal | 82 } // namespace web_modal |
| 79 | 83 |
| 80 #endif // COMPONENTS_WEB_MODAL_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ | 84 #endif // COMPONENTS_WEB_MODAL_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_H_ |
| OLD | NEW |