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

Issue 7831041: Fix print preview workflow to reflect settings of selected printer. (Closed)

Created:
9 years, 3 months ago by arthurhsu
Modified:
9 years, 3 months ago
CC:
chromium-reviews, arv (Not doing code reviews), darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Fix print preview workflow to reflect settings of selected printer. BUG=95110 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102242

Patch Set 1 #

Total comments: 13

Patch Set 2 : Update per code review #

Total comments: 22

Patch Set 3 : Update per code review #

Total comments: 18

Patch Set 4 : Update per code review #

Total comments: 6

Patch Set 5 : Update per code review #

Total comments: 7

Patch Set 6 : Update per code review #

Total comments: 4

Patch Set 7 : Update per code review #

Total comments: 2

Patch Set 8 : Update per code review #

Total comments: 12

Patch Set 9 : Update per code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -53 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/print_dialog_gtk.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/printing/printing_message_filter.cc View 1 2 3 4 5 6 2 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/resources/print_preview/print_preview.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/mock_printer.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/renderer/print_web_view_helper.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 9 chunks +58 lines, -31 lines 0 comments Download
M chrome/renderer/print_web_view_helper_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M printing/print_settings_initializer_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M printing/printing_context_cairo.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
arthurhsu
9 years, 3 months ago (2011-09-02 17:36:31 UTC) #1
kmadhusu
+ thestig
9 years, 3 months ago (2011-09-02 18:16:31 UTC) #2
Lei Zhang
http://codereview.chromium.org/7831041/diff/1/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/1/chrome/browser/printing/printing_message_filter.cc#newcode292 chrome/browser/printing/printing_message_filter.cc:292: printer_query = new printing::PrinterQuery(); just pass an empty |printer_query| ...
9 years, 3 months ago (2011-09-02 18:44:18 UTC) #3
Lei Zhang
http://codereview.chromium.org/7831041/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/7831041/diff/1/chrome/app/generated_resources.grd#newcode5981 chrome/app/generated_resources.grd:5981: The selected printer is not available or not installed ...
9 years, 3 months ago (2011-09-03 00:50:16 UTC) #4
arthurhsu
http://codereview.chromium.org/7831041/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/7831041/diff/1/chrome/app/generated_resources.grd#newcode5981 chrome/app/generated_resources.grd:5981: The selected printer is not available or not installed ...
9 years, 3 months ago (2011-09-06 22:02:26 UTC) #5
kmadhusu
http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (left): http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#oldcode633 chrome/renderer/print_web_view_helper.cc:633: if (!InitPrintSettings(print_preview_context_.frame(), On 2011/09/06 22:02:27, arthurhsu wrote: > On ...
9 years, 3 months ago (2011-09-06 22:47:11 UTC) #6
arthurhsu
On 2011/09/06 22:47:11, kmadhusu wrote: > http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc > File chrome/renderer/print_web_view_helper.cc (left): > > http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#oldcode633 > ...
9 years, 3 months ago (2011-09-12 17:00:49 UTC) #7
kmadhusu
http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#newcode1079 chrome/renderer/print_web_view_helper.cc:1079: if (print_pages_params_ == NULL) { Can you please explain ...
9 years, 3 months ago (2011-09-12 17:20:33 UTC) #8
arthurhsu
http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#newcode1079 chrome/renderer/print_web_view_helper.cc:1079: if (print_pages_params_ == NULL) { On 2011/09/12 17:20:33, kmadhusu ...
9 years, 3 months ago (2011-09-12 17:25:13 UTC) #9
kmadhusu
http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#newcode1079 chrome/renderer/print_web_view_helper.cc:1079: if (print_pages_params_ == NULL) { On 2011/09/12 17:25:13, arthurhsu ...
9 years, 3 months ago (2011-09-12 17:36:52 UTC) #10
arthurhsu
http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/1/chrome/renderer/print_web_view_helper.cc#newcode1079 chrome/renderer/print_web_view_helper.cc:1079: if (print_pages_params_ == NULL) { On 2011/09/12 17:36:52, kmadhusu ...
9 years, 3 months ago (2011-09-12 18:20:11 UTC) #11
arthurhsu
ping
9 years, 3 months ago (2011-09-13 18:58:19 UTC) #12
kmadhusu
http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc#newcode291 chrome/browser/printing/printing_message_filter.cc:291: if (!printer_query.get()) { nit: {} is not required. http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc#newcode309 ...
9 years, 3 months ago (2011-09-13 20:01:33 UTC) #13
Lei Zhang
http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc#newcode306 chrome/browser/printing/printing_message_filter.cc:306: bool failure = false; I don't think you need ...
9 years, 3 months ago (2011-09-13 20:09:53 UTC) #14
kmadhusu
http://codereview.chromium.org/7831041/diff/12002/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/12002/chrome/renderer/print_web_view_helper.cc#newcode573 chrome/renderer/print_web_view_helper.cc:573: if (!InitPrintSettingsAndPrepareFrame(pdf_frame, &pdf_element, &prepare)) { What will happen if ...
9 years, 3 months ago (2011-09-13 20:15:34 UTC) #15
arthurhsu
http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/12002/chrome/browser/printing/printing_message_filter.cc#newcode291 chrome/browser/printing/printing_message_filter.cc:291: if (!printer_query.get()) { On 2011/09/13 20:01:33, kmadhusu wrote: > ...
9 years, 3 months ago (2011-09-14 01:08:02 UTC) #16
kmadhusu
http://codereview.chromium.org/7831041/diff/18001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/18001/chrome/browser/printing/printing_message_filter.cc#newcode223 chrome/browser/printing/printing_message_filter.cc:223: nit: Please remove the blank line. http://codereview.chromium.org/7831041/diff/18001/chrome/browser/printing/printing_message_filter.cc#newcode314 chrome/browser/printing/printing_message_filter.cc:314: nit: ...
9 years, 3 months ago (2011-09-14 01:37:25 UTC) #17
arthurhsu
http://codereview.chromium.org/7831041/diff/18001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/18001/chrome/browser/printing/printing_message_filter.cc#newcode223 chrome/browser/printing/printing_message_filter.cc:223: On 2011/09/14 01:37:25, kmadhusu wrote: > nit: Please remove ...
9 years, 3 months ago (2011-09-16 18:23:01 UTC) #18
kmadhusu
http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc#newcode314 chrome/browser/printing/printing_message_filter.cc:314: print_job_manager_->QueuePrinterQuery(printer_query.get()); Do you need to queue the printer query ...
9 years, 3 months ago (2011-09-16 20:31:14 UTC) #19
kmadhusu
http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (left): http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc#oldcode290 chrome/browser/printing/printing_message_filter.cc:290: print_job_manager_->PopPrinterQuery(document_cookie, &printer_query); Validate the document_cookie and if it is ...
9 years, 3 months ago (2011-09-16 20:39:11 UTC) #20
arthurhsu
http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (left): http://codereview.chromium.org/7831041/diff/21001/chrome/browser/printing/printing_message_filter.cc#oldcode290 chrome/browser/printing/printing_message_filter.cc:290: print_job_manager_->PopPrinterQuery(document_cookie, &printer_query); On 2011/09/16 20:39:11, kmadhusu wrote: > Validate ...
9 years, 3 months ago (2011-09-16 23:39:33 UTC) #21
kmadhusu
http://codereview.chromium.org/7831041/diff/28001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/28001/chrome/browser/printing/printing_message_filter.cc#newcode297 chrome/browser/printing/printing_message_filter.cc:297: if (!printer_query.get()) { nit: {} is not required http://codereview.chromium.org/7831041/diff/28001/chrome/renderer/print_web_view_helper.cc ...
9 years, 3 months ago (2011-09-19 19:09:41 UTC) #22
arthurhsu
http://codereview.chromium.org/7831041/diff/28001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): http://codereview.chromium.org/7831041/diff/28001/chrome/browser/printing/printing_message_filter.cc#newcode297 chrome/browser/printing/printing_message_filter.cc:297: if (!printer_query.get()) { On 2011/09/19 19:09:41, kmadhusu wrote: > ...
9 years, 3 months ago (2011-09-19 22:24:49 UTC) #23
kmadhusu
http://codereview.chromium.org/7831041/diff/34001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/34001/chrome/renderer/print_web_view_helper.cc#newcode1104 chrome/renderer/print_web_view_helper.cc:1104: if (is_preview && job_settings.empty()) { In the preview printing ...
9 years, 3 months ago (2011-09-20 00:42:41 UTC) #24
arthurhsu
http://codereview.chromium.org/7831041/diff/34001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/34001/chrome/renderer/print_web_view_helper.cc#newcode1104 chrome/renderer/print_web_view_helper.cc:1104: if (is_preview && job_settings.empty()) { On 2011/09/20 00:42:41, kmadhusu ...
9 years, 3 months ago (2011-09-20 18:41:19 UTC) #25
kmadhusu
LGTM with a comment. http://codereview.chromium.org/7831041/diff/38001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/38001/chrome/renderer/print_web_view_helper.cc#newcode1103 chrome/renderer/print_web_view_helper.cc:1103: if (is_preview && job_settings.empty()) { ...
9 years, 3 months ago (2011-09-20 20:55:08 UTC) #26
arthurhsu
Also update test cases per our discussions. http://codereview.chromium.org/7831041/diff/38001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/7831041/diff/38001/chrome/renderer/print_web_view_helper.cc#newcode1103 chrome/renderer/print_web_view_helper.cc:1103: if (is_preview ...
9 years, 3 months ago (2011-09-20 21:39:47 UTC) #27
Lei Zhang
Since the print preview tests all interactive with a mock render thread and mock printer, ...
9 years, 3 months ago (2011-09-21 02:57:16 UTC) #28
Lei Zhang
s/interactive/interacts/
9 years, 3 months ago (2011-09-21 02:57:51 UTC) #29
Lei Zhang
http://codereview.chromium.org/7831041/diff/41001/chrome/renderer/mock_printer.cc File chrome/renderer/mock_printer.cc (left): http://codereview.chromium.org/7831041/diff/41001/chrome/renderer/mock_printer.cc#oldcode126 chrome/renderer/mock_printer.cc:126: EXPECT_EQ(document_cookie_, cookie); Since UpdateSettings() is effectively the new InitPrintSettings() ...
9 years, 3 months ago (2011-09-21 03:56:04 UTC) #30
arthurhsu
Linux part fixed with Lei's code, thanks. Tested Mac runs fine locally. http://codereview.chromium.org/7831041/diff/41001/chrome/renderer/mock_printer.cc File chrome/renderer/mock_printer.cc ...
9 years, 3 months ago (2011-09-22 00:01:26 UTC) #31
Lei Zhang
LGTM
9 years, 3 months ago (2011-09-22 00:24:41 UTC) #32
commit-bot: I haz the power
9 years, 3 months ago (2011-09-22 05:31:02 UTC) #33
Change committed as 102242

Powered by Google App Engine
This is Rietveld 408576698