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

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

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
« no previous file with comments | « chrome/browser/ui/web_contents_modal_dialog_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/web_contents_modal_dialog_manager.cc
diff --git a/chrome/browser/ui/web_contents_modal_dialog_manager.cc b/chrome/browser/ui/web_contents_modal_dialog_manager.cc
index c9dd7cdb8304aef0da34eba9febfca69b690f1ff..3d47569d4a4019f1a13cff896a9eb9d8751f97bf 100644
--- a/chrome/browser/ui/web_contents_modal_dialog_manager.cc
+++ b/chrome/browser/ui/web_contents_modal_dialog_manager.cc
@@ -34,21 +34,6 @@ void WebContentsModalDialogManager::AddDialog(
}
}
-void WebContentsModalDialogManager::WillClose(WebContentsModalDialog* dialog) {
- WebContentsModalDialogList::iterator i(
- std::find(child_dialogs_.begin(), child_dialogs_.end(), dialog));
- bool removed_topmost_dialog = i == child_dialogs_.begin();
- if (i != child_dialogs_.end())
- child_dialogs_.erase(i);
- if (child_dialogs_.empty()) {
- BlockWebContentsInteraction(false);
- } else {
- if (removed_topmost_dialog)
- child_dialogs_[0]->ShowWebContentsModalDialog();
- BlockWebContentsInteraction(true);
- }
-}
-
void WebContentsModalDialogManager::BlockWebContentsInteraction(bool blocked) {
WebContents* contents = web_contents();
if (!contents) {
@@ -78,6 +63,21 @@ void WebContentsModalDialogManager::FocusTopmostDialog() {
window->FocusWebContentsModalDialog();
}
+void WebContentsModalDialogManager::WillClose(WebContentsModalDialog* dialog) {
+ WebContentsModalDialogList::iterator i(
+ std::find(child_dialogs_.begin(), child_dialogs_.end(), dialog));
+ bool removed_topmost_dialog = i == child_dialogs_.begin();
+ if (i != child_dialogs_.end())
+ child_dialogs_.erase(i);
+ if (child_dialogs_.empty()) {
+ BlockWebContentsInteraction(false);
+ } else {
+ if (removed_topmost_dialog)
+ child_dialogs_[0]->ShowWebContentsModalDialog();
+ BlockWebContentsInteraction(true);
+ }
+}
+
WebContentsModalDialogManager::WebContentsModalDialogManager(
content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
« no previous file with comments | « chrome/browser/ui/web_contents_modal_dialog_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698