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