Reland "Close web contents modal dialogs on content load start"
commitfcf88b99fc6e50872629217f3ae1f9e8786740c3
authorwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 18 Jul 2013 11:37:27 +0000 (18 11:37 +0000)
committerwittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 18 Jul 2013 11:37:27 +0000 (18 11:37 +0000)
tree0f82abe482984ba6b0f3b801ee00dd94edc0b989
parent2244aafe0754958d0dfa5b3f7861e07d3363bcbd
Reland "Close web contents modal dialogs on content load start"

Address the failure of some web contents modal dialogs to close when
interstitial WebUI is displayed by closing the dialogs on content load start.
Remove existing ad hoc support in dialogs for closing on page loading in favor
of a uniform approach.

I'm using load start as the trigger for dialog close as this seems to be the
point in time at which the user first perceives the page to be changing.

Notes on the print preview changes: with this change the dialog is closed when
load starts and the initiator tab gets removed via RemovePreviewDialog, so there
is no longer a need to handle NOTIFICATION_NAV_ENTRY_COMITTED for the initiator
tab.  The PrintViewManager::PrintPreviewDone() DCHECK is removed since now
PrintViewManager::RenderViewGone() may be invoked and print_preview_state_ reset
due to WebContents closure before the dialog is destroyed and PrintPreviewDone()
is invoked.

BUG=240575

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211058

Review URL: https://chromiumcodereview.appspot.com/17500003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212329 0039d316-1c4b-4281-b951-d872f2087c98
32 files changed:
chrome/browser/printing/background_printing_manager.cc
chrome/browser/printing/print_preview_dialog_controller.cc
chrome/browser/printing/print_preview_dialog_controller.h
chrome/browser/printing/print_preview_dialog_controller_browsertest.cc
chrome/browser/printing/print_preview_dialog_controller_unittest.cc
chrome/browser/printing/print_view_manager.h
chrome/browser/repost_form_warning_controller.cc
chrome/browser/resources/print_preview/native_layer.js
chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h
chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h
chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm
chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc
chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.h
chrome/browser/ui/tab_modal_confirm_dialog.h
chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
chrome/browser/ui/tab_modal_confirm_dialog_delegate.h
chrome/browser/ui/views/autofill/autofill_dialog_views.cc
chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc
chrome/browser/ui/views/tab_modal_confirm_dialog_views.h
chrome/browser/ui/webui/print_preview/print_preview_handler.cc
chrome/browser/ui/webui/print_preview/print_preview_handler.h
chrome/browser/ui/webui/print_preview/print_preview_ui.cc
chrome/browser/ui/webui/print_preview/print_preview_ui.h
chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc
chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.h
components/web_modal/web_contents_modal_dialog_manager.cc
components/web_modal/web_contents_modal_dialog_manager.h