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

Unified Diff: components/web_modal/web_contents_modal_dialog_manager.cc

Issue 290693002: Remove the unused close_on_interstitial_webui setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment. Created 6 years, 7 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: components/web_modal/web_contents_modal_dialog_manager.cc
diff --git a/components/web_modal/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc
index 7ae8a2dc6e32c40a976920136041b7f57b260bec..415926e6332ee70c6b44a60358c1bce94b26bd6b 100644
--- a/components/web_modal/web_contents_modal_dialog_manager.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc
@@ -63,14 +63,6 @@ void WebContentsModalDialogManager::FocusTopmostDialog() {
child_dialogs_.front()->manager->Focus();
}
-void WebContentsModalDialogManager::SetCloseOnInterstitialPage(
- NativeWebContentsModalDialog dialog,
- bool close) {
- WebContentsModalDialogList::iterator loc = FindDialogState(dialog);
- DCHECK(loc != child_dialogs_.end());
- (*loc)->close_on_interstitial_webui = close;
-}
-
content::WebContents* WebContentsModalDialogManager::GetWebContents() const {
return web_contents();
}
@@ -106,15 +98,7 @@ WebContentsModalDialogManager::DialogState::DialogState(
NativeWebContentsModalDialog dialog,
scoped_ptr<SingleWebContentsDialogManager> mgr)
: dialog(dialog),
- manager(mgr.release()),
-#if defined(USE_AURA)
- close_on_interstitial_webui(true)
-#else
- // TODO(wittman): Test that closing on interstitial webui works properly
- // on Mac and use the true default for all platforms.
- close_on_interstitial_webui(false)
-#endif
- {
+ manager(mgr.release()) {
}
WebContentsModalDialogManager::DialogState::~DialogState() {}
@@ -196,14 +180,10 @@ void WebContentsModalDialogManager::WebContentsDestroyed() {
}
void WebContentsModalDialogManager::DidAttachInterstitialPage() {
- // Copy the dialogs so we can close and remove them while iterating over the
- // list.
- WebContentsModalDialogList dialogs(child_dialogs_);
- for (WebContentsModalDialogList::iterator it = dialogs.begin();
- it != dialogs.end(); ++it) {
- if ((*it)->close_on_interstitial_webui)
- (*it)->manager->Close();
- }
+ // TODO(wittman): Test closing on interstitial webui works properly on Mac.
+#if defined(USE_AURA)
+ CloseAllDialogs();
+#endif
}
} // namespace web_modal

Powered by Google App Engine
This is Rietveld 408576698