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

Issue 196021: Implement PrintPageAsJPEG feature for Print Preview (Closed)

Created:
11 years, 3 months ago by Mohamed Mansour
Modified:
9 years, 6 months ago
Reviewers:
M-A Ruel, Hironori Bono
CC:
chromium-reviews_googlegroups.com, tony, myhuang
Visibility:
Public.

Description

Implement PrintPageAsJPEG feature for Print Preview. In order to show the tab contents to the print tab, the renderer should print the page as a JPEG image so it could be rendered in the DOMUI. A unit test case has been created to make sure the image contains something from deciding whether its not 100% white. MockPrinter has been altered to remove the const parameter, since its useful to retrieve the DefaultSettings not via IPC. BUG=173 (http://crbug.com/173) TEST=created a unit test and ran it. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25445

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -1 line) Patch
M src/chrome/renderer/mock_render_thread.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/chrome/renderer/print_web_view_helper.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M src/chrome/renderer/print_web_view_helper.cc View 1 2 2 chunks +36 lines, -0 lines 0 comments Download
M src/chrome/renderer/render_view.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/chrome/renderer/render_view_unittest.cc View 1 2 2 chunks +44 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mohamed Mansour
One problem though, for src/chrome/renderer/mock_render_thread.h I cannot use printer(), I made another one called printers(). ...
11 years, 3 months ago (2009-09-04 02:49:26 UTC) #1
M-A Ruel
lgtm with small nits. http://codereview.chromium.org/196021/diff/2001/2002 File src/chrome/renderer/mock_render_thread.h (right): http://codereview.chromium.org/196021/diff/2001/2002#newcode73 Line 73: const MockPrinter* printer() const ...
11 years, 3 months ago (2009-09-04 03:59:07 UTC) #2
Mohamed Mansour
Applied maruel's comments. http://codereview.chromium.org/196021/diff/2001/2002 File src/chrome/renderer/mock_render_thread.h (right): http://codereview.chromium.org/196021/diff/2001/2002#newcode73 Line 73: const MockPrinter* printer() const { ...
11 years, 3 months ago (2009-09-04 05:10:18 UTC) #3
Hironori Bono
11 years, 3 months ago (2009-09-04 06:16:33 UTC) #4
LGTM
Thank you for your change.

Regards,

Hironori Bono

Powered by Google App Engine
This is Rietveld 408576698