| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/native_web_contents_modal_dialog.h" | 8 #include "chrome/browser/ui/native_web_contents_modal_dialog.h" |
| 9 | 9 |
| 10 class WebContentsModalDialog; |
| 11 |
| 12 // Interface from NativeWebContentsModalDialogManager to |
| 13 // WebContentsModalDialogManager. |
| 14 class NativeWebContentsModalDialogManagerDelegate { |
| 15 public: |
| 16 NativeWebContentsModalDialogManagerDelegate() {} |
| 17 virtual ~NativeWebContentsModalDialogManagerDelegate() {} |
| 18 |
| 19 virtual void WillClose(WebContentsModalDialog* dialog) = 0; |
| 20 |
| 21 private: |
| 22 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerDelegate); |
| 23 }; |
| 24 |
| 10 // Provides an interface for platform-specific UI implementation for the web | 25 // Provides an interface for platform-specific UI implementation for the web |
| 11 // contents modal dialog. | 26 // contents modal dialog. |
| 12 class NativeWebContentsModalDialogManager { | 27 class NativeWebContentsModalDialogManager { |
| 13 public: | 28 public: |
| 14 virtual ~NativeWebContentsModalDialogManager() {} | 29 virtual ~NativeWebContentsModalDialogManager() {} |
| 15 | 30 |
| 16 // Starts management of the modal aspects of the dialog. This function should | 31 // Starts management of the modal aspects of the dialog. This function should |
| 17 // also register to be notified when the dialog is closing, so that it can | 32 // also register to be notified when the dialog is closing, so that it can |
| 18 // notify the manager. | 33 // notify the manager. |
| 19 virtual void ManageDialog(NativeWebContentsModalDialog dialog) = 0; | 34 virtual void ManageDialog(NativeWebContentsModalDialog dialog) = 0; |
| 20 | 35 |
| 21 // Closes the web contents modal dialog. | 36 // Closes the web contents modal dialog. |
| 22 virtual void CloseDialog(NativeWebContentsModalDialog dialog) = 0; | 37 virtual void CloseDialog(NativeWebContentsModalDialog dialog) = 0; |
| 23 | 38 |
| 24 protected: | 39 protected: |
| 25 NativeWebContentsModalDialogManager() {} | 40 NativeWebContentsModalDialogManager() {} |
| 26 | 41 |
| 27 private: | 42 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManager); | 43 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManager); |
| 29 }; | 44 }; |
| 30 | 45 |
| 31 #endif // CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ | 46 #endif // CHROME_BROWSER_UI_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ |
| OLD | NEW |