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

Issue 8136027: Print Preview: Make print preview tab modal. (Closed)

Created:
9 years, 2 months ago by Lei Zhang
Modified:
9 years, 1 month ago
CC:
chromium-reviews, arv (Not doing code reviews), darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Print Preview: Make print preview tab modal. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110056

Patch Set 1 : make more tests pass / disable some tests #

Patch Set 2 : rebase, more fixes #

Total comments: 30

Patch Set 3 : rebase, address comments #

Patch Set 4 : address preview tab navigation, cancelling print to pdf issues #

Total comments: 28

Patch Set 5 : fix minor issue for potentially calling RemoveObserver twice #

Patch Set 6 : do not listen for F1 key in JS #

Total comments: 16

Patch Set 7 : address comments #

Total comments: 1

Patch Set 8 : rebase after ConstrainedHtmlDelegate commit #

Patch Set 9 : fix print to pdf for window.print #

Total comments: 2

Patch Set 10 : fix crashes on windows, closing tabs on cloud print #

Patch Set 11 : fix flaky browser tests #

Total comments: 2

Patch Set 12 : rename ReloadCloudPrintersList to ReloadPrintersList #

Total comments: 2

Patch Set 13 : address comments #

Total comments: 2

Patch Set 14 : rebase, no renderer changes #

Total comments: 13

Patch Set 15 : address comments, remove another block of unneeded code #

Patch Set 16 : rebase #

Patch Set 17 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+501 lines, -696 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/printing/background_printing_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +0 lines, -20 lines 0 comments Download
M chrome/browser/printing/background_printing_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +3 lines, -67 lines 0 comments Download
M chrome/browser/printing/print_preview_message_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/printing/print_preview_message_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/printing/print_preview_tab_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/printing/print_preview_tab_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +186 lines, -100 lines 0 comments Download
M chrome/browser/printing/print_preview_tab_controller_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +59 lines, -169 lines 0 comments Download
M chrome/browser/printing/print_preview_tab_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +14 lines, -62 lines 0 comments Download
M chrome/browser/printing/print_view_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +0 lines, -11 lines 0 comments Download
M chrome/browser/printing/print_view_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +4 lines, -20 lines 0 comments Download
M chrome/browser/resources/print_preview/print_header.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/resources/print_preview/print_preview.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +22 lines, -39 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +16 lines, -17 lines 0 comments Download
M chrome/browser/ui/browser_list_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/cloud_print_signin_dialog.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/constrained_html_ui.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/print_preview_data_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +3 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 chunks +11 lines, -60 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +55 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -56 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/test/base/test_tab_strip_model_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +12 lines, -9 lines 0 comments Download
M chrome/test/base/test_tab_strip_model_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +24 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
Lei Zhang
I'd start by just ignoring the tests and the HtmlDelegate code. The HtmlDelegate code is ...
9 years, 2 months ago (2011-10-13 09:49:16 UTC) #1
kmadhusu
http://codereview.chromium.org/8136027/diff/36046/chrome/browser/printing/background_printing_manager.h File chrome/browser/printing/background_printing_manager.h (left): http://codereview.chromium.org/8136027/diff/36046/chrome/browser/printing/background_printing_manager.h#oldcode59 chrome/browser/printing/background_printing_manager.h:59: TabContentsWrapperMap; You can delete this typedef. http://codereview.chromium.org/8136027/diff/36046/chrome/browser/printing/print_preview_message_handler.cc File chrome/browser/printing/print_preview_message_handler.cc ...
9 years, 2 months ago (2011-10-13 18:52:18 UTC) #2
kmadhusu
(repeating our conversation): We need to disable the context menu on the preview tab. In ...
9 years, 2 months ago (2011-10-13 19:18:17 UTC) #3
dpapad
On 2011/10/13 19:18:17, kmadhusu wrote: > (repeating our conversation): We need to disable the context ...
9 years, 2 months ago (2011-10-13 19:57:33 UTC) #4
Lei Zhang
Still looking at the later comments. We want users to be able to view source ...
9 years, 2 months ago (2011-10-13 21:12:12 UTC) #5
Lei Zhang
On 2011/10/13 19:18:17, kmadhusu wrote: > (repeating our conversation): We need to disable the context ...
9 years, 2 months ago (2011-10-13 22:16:32 UTC) #6
kmadhusu
http://codereview.chromium.org/8136027/diff/51006/chrome/browser/printing/print_preview_tab_controller.cc File chrome/browser/printing/print_preview_tab_controller.cc (right): http://codereview.chromium.org/8136027/diff/51006/chrome/browser/printing/print_preview_tab_controller.cc#newcode74 chrome/browser/printing/print_preview_tab_controller.cc:74: const gfx::Size min_size(800, 480); Define const int variables for ...
9 years, 2 months ago (2011-10-14 00:21:08 UTC) #7
kmadhusu
I tested with your patch and saw some segfaults and crashes. Test 1: Segmentation fault ...
9 years, 2 months ago (2011-10-14 01:11:38 UTC) #8
vandebo (ex-Chrome)
It seems like you need additional reviewers. i.e. I don't think any of your current ...
9 years, 2 months ago (2011-10-14 07:14:05 UTC) #9
Lei Zhang
Darin: can you take a look at the renderer side changes for adding the nested ...
9 years, 2 months ago (2011-10-14 18:26:06 UTC) #10
Lei Zhang
http://codereview.chromium.org/8136027/diff/51006/chrome/browser/printing/print_preview_tab_controller.cc File chrome/browser/printing/print_preview_tab_controller.cc (right): http://codereview.chromium.org/8136027/diff/51006/chrome/browser/printing/print_preview_tab_controller.cc#newcode74 chrome/browser/printing/print_preview_tab_controller.cc:74: const gfx::Size min_size(800, 480); On 2011/10/14 00:21:09, kmadhusu wrote: ...
9 years, 2 months ago (2011-10-14 20:31:26 UTC) #11
kmadhusu
http://codereview.chromium.org/8136027/diff/59002/chrome/browser/printing/print_preview_tab_controller.cc File chrome/browser/printing/print_preview_tab_controller.cc (right): http://codereview.chromium.org/8136027/diff/59002/chrome/browser/printing/print_preview_tab_controller.cc#newcode74 chrome/browser/printing/print_preview_tab_controller.cc:74: const gfx::Size kMinDialogSize(800, 480); sorry.. i missed the const ...
9 years, 2 months ago (2011-10-14 22:48:13 UTC) #12
kmadhusu
I didn't see any of the above said crashes using the latest patch. But I ...
9 years, 2 months ago (2011-10-14 22:51:25 UTC) #13
Lei Zhang
I've seen both of those debug-only crashes and I'm not too worried about them. http://codereview.chromium.org/8136027/diff/67007/chrome/browser/ui/webui/print_preview_handler.cc ...
9 years, 2 months ago (2011-10-14 23:22:07 UTC) #14
Lei Zhang
On 2011/10/14 23:22:07, Lei Zhang wrote: > I've seen both of those debug-only crashes and ...
9 years, 2 months ago (2011-10-15 18:59:32 UTC) #15
kmadhusu
lgtm Please ask albert to review the CrOS cloud print code.
9 years, 2 months ago (2011-10-16 07:31:34 UTC) #16
Lei Zhang
Albert: Currently on CrOS, CP reloads the print preview page on sign in. This doesn't ...
9 years, 2 months ago (2011-10-17 05:39:09 UTC) #17
Albert Bodenhamer
lgtm http://codereview.chromium.org/8136027/diff/73001/chrome/browser/resources/print_preview/print_preview.js File chrome/browser/resources/print_preview/print_preview.js (right): http://codereview.chromium.org/8136027/diff/73001/chrome/browser/resources/print_preview/print_preview.js#newcode267 chrome/browser/resources/print_preview/print_preview.js:267: function reloadCloudPrintersList() { Nit: Wont this reload all ...
9 years, 2 months ago (2011-10-17 16:43:42 UTC) #18
Lei Zhang
http://codereview.chromium.org/8136027/diff/73001/chrome/browser/resources/print_preview/print_preview.js File chrome/browser/resources/print_preview/print_preview.js (right): http://codereview.chromium.org/8136027/diff/73001/chrome/browser/resources/print_preview/print_preview.js#newcode267 chrome/browser/resources/print_preview/print_preview.js:267: function reloadCloudPrintersList() { On 2011/10/17 16:43:42, Albert Bodenhamer wrote: ...
9 years, 2 months ago (2011-10-17 18:18:57 UTC) #19
darin (slow to review)
http://codereview.chromium.org/8136027/diff/59007/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/8136027/diff/59007/chrome/renderer/print_web_view_helper.cc#newcode1279 chrome/renderer/print_web_view_helper.cc:1279: MessageLoop* message_loop = print_preview_context_.message_loop(); why do you need the ...
9 years, 2 months ago (2011-10-17 19:41:39 UTC) #20
Lei Zhang
http://codereview.chromium.org/8136027/diff/59007/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/8136027/diff/59007/chrome/renderer/print_web_view_helper.cc#newcode1279 chrome/renderer/print_web_view_helper.cc:1279: MessageLoop* message_loop = print_preview_context_.message_loop(); On 2011/10/17 19:41:39, darin wrote: ...
9 years, 2 months ago (2011-10-17 20:07:06 UTC) #21
darin (slow to review)
http://codereview.chromium.org/8136027/diff/81002/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/8136027/diff/81002/chrome/renderer/print_web_view_helper.cc#newcode1532 chrome/renderer/print_web_view_helper.cc:1532: return in_nested_message_loop_; can you explain why you need this ...
9 years, 2 months ago (2011-10-17 22:16:32 UTC) #22
Lei Zhang
http://codereview.chromium.org/8136027/diff/81002/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/8136027/diff/81002/chrome/renderer/print_web_view_helper.cc#newcode1532 chrome/renderer/print_web_view_helper.cc:1532: return in_nested_message_loop_; On 2011/10/17 22:16:33, darin wrote: > can ...
9 years, 2 months ago (2011-10-17 22:26:05 UTC) #23
Lei Zhang
In patch set 14, I reduced the scope of this CL to just the UI ...
9 years, 1 month ago (2011-11-02 08:14:19 UTC) #24
vandebo (ex-Chrome)
LGTM from what I can tell. http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_message_handler.cc File chrome/browser/printing/print_preview_message_handler.cc (right): http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_message_handler.cc#newcode261 chrome/browser/printing/print_preview_message_handler.cc:261: } What should ...
9 years, 1 month ago (2011-11-02 20:50:30 UTC) #25
Lei Zhang
http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_message_handler.cc File chrome/browser/printing/print_preview_message_handler.cc (right): http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_message_handler.cc#newcode261 chrome/browser/printing/print_preview_message_handler.cc:261: } On 2011/11/02 20:50:30, vandebo wrote: > What should ...
9 years, 1 month ago (2011-11-02 22:50:03 UTC) #26
vandebo (ex-Chrome)
http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_tab_controller_unittest.cc File chrome/browser/printing/print_preview_tab_controller_unittest.cc (right): http://codereview.chromium.org/8136027/diff/95004/chrome/browser/printing/print_preview_tab_controller_unittest.cc#newcode46 chrome/browser/printing/print_preview_tab_controller_unittest.cc:46: EXPECT_EQ(1, browser()->tab_count()); On 2011/11/02 22:50:03, Lei Zhang wrote: > ...
9 years, 1 month ago (2011-11-02 22:52:35 UTC) #27
kmadhusu
9 years, 1 month ago (2011-11-02 22:56:09 UTC) #28
lgtm

Powered by Google App Engine
This is Rietveld 408576698