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

Issue 17500003: Close web contents modal dialogs on content load start (Closed)

Created:
7 years, 6 months ago by Mike Wittman
Modified:
7 years, 5 months ago
CC:
chromium-reviews, ahutter, benquan
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=212329

Patch Set 1 #

Total comments: 7

Patch Set 2 : Don't observe nav committed for initiator tab #

Total comments: 4

Patch Set 3 : change PREVIEW_TAB -> PREVIEW_DIALOG, TabType -> ContentType #

Patch Set 4 : Bonus patchset: initiator tab -> initiator #

Total comments: 8

Patch Set 5 : Additional initiator tab cleanup #

Patch Set 6 : rebase #

Patch Set 7 : Fix typo #

Patch Set 8 : rebase #

Patch Set 9 : Fix for autocheckout dialog breakage #

Total comments: 6

Patch Set 10 : Address review comments #

Patch Set 11 : Fix crash accepting OS X report form warning dialog #

Total comments: 2

Patch Set 12 : SetInhibitCloseOnLoadStart -> SetPreventCloseOnLoadStart #

Patch Set 13 : Compilation fixes, change "inhibit" variable names #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -329 lines) Patch
M chrome/browser/printing/background_printing_manager.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/printing/print_preview_dialog_controller.h View 1 2 3 4 7 chunks +30 lines, -22 lines 0 comments Download
M chrome/browser/printing/print_preview_dialog_controller.cc View 1 2 3 4 5 6 7 16 chunks +95 lines, -92 lines 0 comments Download
M chrome/browser/printing/print_preview_dialog_controller_browsertest.cc View 1 2 3 4 5 7 chunks +16 lines, -16 lines 0 comments Download
M chrome/browser/printing/print_preview_dialog_controller_unittest.cc View 1 2 3 4 5 6 6 chunks +33 lines, -35 lines 0 comments Download
M chrome/browser/printing/print_view_manager.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/repost_form_warning_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/print_preview/native_layer.js View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ui/tab_modal_confirm_dialog.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/tab_modal_confirm_dialog_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +14 lines, -10 lines 0 comments Download
M chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tab_modal_confirm_dialog_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 3 4 17 chunks +45 lines, -45 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.h View 1 2 3 4 5 4 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc View 1 2 3 3 chunks +20 lines, -26 lines 0 comments Download
M chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +14 lines, -3 lines 0 comments Download
M components/web_modal/web_contents_modal_dialog_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +17 lines, -4 lines 0 comments Download
M components/web_modal/web_contents_modal_dialog_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +51 lines, -28 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
Mike Wittman
Hi Demetrios, can you take a look at the printing and web_modal parts of this ...
7 years, 6 months ago (2013-06-20 18:11:50 UTC) #1
dpapad
On 2013/06/20 18:11:50, Mike Wittman wrote: > Hi Demetrios, can you take a look at ...
7 years, 6 months ago (2013-06-20 18:17:07 UTC) #2
Mike Wittman
Hi Lei, PTAL and/or redirect to someone who can.
7 years, 6 months ago (2013-06-20 18:20:56 UTC) #3
Lei Zhang
It's been a while, but I can take a look after I get my M29 ...
7 years, 6 months ago (2013-06-20 19:28:55 UTC) #4
Mike Wittman
On 2013/06/20 19:28:55, Lei Zhang wrote: > It's been a while, but I can take ...
7 years, 6 months ago (2013-06-20 19:46:40 UTC) #5
Mike Wittman
ping
7 years, 5 months ago (2013-06-26 21:49:33 UTC) #6
Lei Zhang
You probably want another reviewer for the non-printing bits. I'm not at all familiar with ...
7 years, 5 months ago (2013-06-27 00:31:18 UTC) #7
Mike Wittman
On 2013/06/27 00:31:18, Lei Zhang wrote: > You probably want another reviewer for the non-printing ...
7 years, 5 months ago (2013-06-27 00:58:11 UTC) #8
Lei Zhang
https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (left): https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_view_manager.cc#oldcode156 chrome/browser/printing/print_view_manager.cc:156: DCHECK_NE(NOT_PREVIEWING, print_preview_state_); If I put this DCHECK back, I ...
7 years, 5 months ago (2013-06-27 02:28:45 UTC) #9
Lei Zhang
https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_preview_dialog_controller.cc File chrome/browser/printing/print_preview_dialog_controller.cc (left): https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_preview_dialog_controller.cc#oldcode392 chrome/browser/printing/print_preview_dialog_controller.cc:392: RemoveInitiatorTab(contents); On 2013/06/27 00:58:11, Mike Wittman wrote: > On ...
7 years, 5 months ago (2013-06-27 02:29:37 UTC) #10
Mike Wittman
https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_preview_dialog_controller.cc File chrome/browser/printing/print_preview_dialog_controller.cc (left): https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_preview_dialog_controller.cc#oldcode392 chrome/browser/printing/print_preview_dialog_controller.cc:392: RemoveInitiatorTab(contents); On 2013/06/27 02:29:37, Lei Zhang wrote: > On ...
7 years, 5 months ago (2013-06-27 17:34:04 UTC) #11
Lei Zhang
https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (left): https://codereview.chromium.org/17500003/diff/1/chrome/browser/printing/print_view_manager.cc#oldcode156 chrome/browser/printing/print_view_manager.cc:156: DCHECK_NE(NOT_PREVIEWING, print_preview_state_); On 2013/06/27 17:34:04, Mike Wittman wrote: > ...
7 years, 5 months ago (2013-06-27 21:36:18 UTC) #12
Mike Wittman
https://codereview.chromium.org/17500003/diff/18001/chrome/browser/printing/print_preview_dialog_controller.cc File chrome/browser/printing/print_preview_dialog_controller.cc (right): https://codereview.chromium.org/17500003/diff/18001/chrome/browser/printing/print_preview_dialog_controller.cc#newcode364 chrome/browser/printing/print_preview_dialog_controller.cc:364: DCHECK(contents == preview_dialog); On 2013/06/27 21:36:18, Lei Zhang wrote: ...
7 years, 5 months ago (2013-06-27 23:39:38 UTC) #13
Lei Zhang
On 2013/06/27 21:36:18, Lei Zhang wrote: > No luck for me on Linux-views. I'll fire ...
7 years, 5 months ago (2013-06-28 19:53:57 UTC) #14
Lei Zhang
Thanks for doing more cleanup! https://codereview.chromium.org/17500003/diff/29001/chrome/browser/printing/background_printing_manager.cc File chrome/browser/printing/background_printing_manager.cc (right): https://codereview.chromium.org/17500003/diff/29001/chrome/browser/printing/background_printing_manager.cc#newcode72 chrome/browser/printing/background_printing_manager.cc:72: dialog_controller->GetInitiator(preview_dialog); nit: fits on ...
7 years, 5 months ago (2013-06-29 00:24:17 UTC) #15
Mike Wittman
https://codereview.chromium.org/17500003/diff/29001/chrome/browser/printing/background_printing_manager.cc File chrome/browser/printing/background_printing_manager.cc (right): https://codereview.chromium.org/17500003/diff/29001/chrome/browser/printing/background_printing_manager.cc#newcode72 chrome/browser/printing/background_printing_manager.cc:72: dialog_controller->GetInitiator(preview_dialog); On 2013/06/29 00:24:18, Lei Zhang wrote: > nit: ...
7 years, 5 months ago (2013-07-01 17:16:12 UTC) #16
Lei Zhang
I have a new CL to fix the test: https://codereview.chromium.org/18422004/ It works fine on Linux ...
7 years, 5 months ago (2013-07-02 07:31:47 UTC) #17
Lei Zhang
lgtm, though you'll need to resolve a lot of conflicts in print_preview_dialog_controller_browsertest.cc once my test ...
7 years, 5 months ago (2013-07-02 21:21:23 UTC) #18
Mike Wittman
Hi Ben, please review chrome/browser/ui/tab_modal_confirm_dialog_delegate.{cc,h} components/web_modal/web_contents_modal_dialog_manager.{cc,h} All other changes in this CL are related to ...
7 years, 5 months ago (2013-07-02 22:25:46 UTC) #19
Ben Goodger (Google)
lgtm
7 years, 5 months ago (2013-07-10 19:21:07 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/17500003/49001
7 years, 5 months ago (2013-07-10 22:42:43 UTC) #21
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-10 23:53:18 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/17500003/71001
7 years, 5 months ago (2013-07-11 00:05:54 UTC) #23
commit-bot: I haz the power
Change committed as 211058
7 years, 5 months ago (2013-07-11 10:46:13 UTC) #24
Mike Wittman
I reverted this change in r211420 because it broke the autofill dialog, which relies on ...
7 years, 5 months ago (2013-07-12 23:30:31 UTC) #25
Ilya Sherman
LGTM % nits, though it's usually preferred to create a new CL, uploading the committed ...
7 years, 5 months ago (2013-07-12 23:58:27 UTC) #26
Mike Wittman
On 2013/07/12 23:58:27, Ilya Sherman wrote: > LGTM % nits, though it's usually preferred to ...
7 years, 5 months ago (2013-07-13 00:16:34 UTC) #27
Mike Wittman
Ben: please review the additional patch set 11, in addition to the changes in Patch ...
7 years, 5 months ago (2013-07-17 00:54:48 UTC) #28
Ben Goodger (Google)
lgtm https://codereview.chromium.org/17500003/diff/112001/components/web_modal/web_contents_modal_dialog_manager.h File components/web_modal/web_contents_modal_dialog_manager.h (right): https://codereview.chromium.org/17500003/diff/112001/components/web_modal/web_contents_modal_dialog_manager.h#newcode50 components/web_modal/web_contents_modal_dialog_manager.h:50: void SetInhibitCloseOnLoadStart(NativeWebContentsModalDialog dialog, SetPreventClose.. ?
7 years, 5 months ago (2013-07-17 16:48:15 UTC) #29
Mike Wittman
https://codereview.chromium.org/17500003/diff/112001/components/web_modal/web_contents_modal_dialog_manager.h File components/web_modal/web_contents_modal_dialog_manager.h (right): https://codereview.chromium.org/17500003/diff/112001/components/web_modal/web_contents_modal_dialog_manager.h#newcode50 components/web_modal/web_contents_modal_dialog_manager.h:50: void SetInhibitCloseOnLoadStart(NativeWebContentsModalDialog dialog, On 2013/07/17 16:48:15, Ben Goodger (Google) ...
7 years, 5 months ago (2013-07-17 17:57:49 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/17500003/126032
7 years, 5 months ago (2013-07-17 19:07:12 UTC) #31
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-17 20:13:09 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/17500003/126032
7 years, 5 months ago (2013-07-17 20:52:05 UTC) #33
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-17 21:07:24 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/17500003/155002
7 years, 5 months ago (2013-07-18 00:11:46 UTC) #35
commit-bot: I haz the power
7 years, 5 months ago (2013-07-18 11:37:29 UTC) #36
Message was sent while issue was closed.
Change committed as 212329

Powered by Google App Engine
This is Rietveld 408576698