Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1480)

Unified Diff: chrome/browser/ui/web_contents_modal_dialog_manager.h

Issue 12281012: Introduce NativeWebContentsModalDialogManagerDelegate interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use virtual dtor Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/web_contents_modal_dialog_manager.h
diff --git a/chrome/browser/ui/web_contents_modal_dialog_manager.h b/chrome/browser/ui/web_contents_modal_dialog_manager.h
index 93840953947bef594cc8631c8e82d7e5207d7067..98b1eac26379dfd6428171125b4a3a7a70e5fd11 100644
--- a/chrome/browser/ui/web_contents_modal_dialog_manager.h
+++ b/chrome/browser/ui/web_contents_modal_dialog_manager.h
@@ -18,7 +18,8 @@ class WebContentsModalDialogManagerDelegate;
// Per-WebContents class to manage WebContents-modal dialogs.
class WebContentsModalDialogManager
- : public content::WebContentsObserver,
+ : public NativeWebContentsModalDialogManagerDelegate,
+ public content::WebContentsObserver,
public content::WebContentsUserData<WebContentsModalDialogManager> {
public:
virtual ~WebContentsModalDialogManager();
@@ -27,15 +28,12 @@ class WebContentsModalDialogManager
void set_delegate(WebContentsModalDialogManagerDelegate* d) { delegate_ = d; }
static NativeWebContentsModalDialogManager* CreateNativeManager(
- WebContentsModalDialogManager* manager);
+ NativeWebContentsModalDialogManagerDelegate* native_delegate);
// Adds the given dialog to the list of child dialogs. The dialog will notify
// via WillClose() when it is being destroyed.
void AddDialog(WebContentsModalDialog* dialog);
- // Called when a WebContentsModalDialogs we own is about to be closed.
- void WillClose(WebContentsModalDialog* dialog);
-
// Blocks/unblocks interaction with renderer process.
void BlockWebContentsInteraction(bool blocked);
@@ -46,6 +44,10 @@ class WebContentsModalDialogManager
// calling this function.
void FocusTopmostDialog();
+ // Overriden from NativeWebContentsModalDialogManagerDelegate:
+ // Called when a WebContentsModalDialogs we own is about to be closed.
+ virtual void WillClose(WebContentsModalDialog* dialog) OVERRIDE;
+
// For testing.
class TestApi {
public:

Powered by Google App Engine
This is Rietveld 408576698