| 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
|
|
|