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

Issue 7038028: Initial support for cloudprint in print preview (Closed)

Created:
9 years, 7 months ago by Albert Bodenhamer
Modified:
9 years, 5 months ago
CC:
chromium-reviews, arv (Not doing code reviews), jam, brettw-cc_chromium.org
Visibility:
Public.

Description

Initial support for cloudprint in print preview. To enable in Windows/Mac/Linux pass "--enable-cloud-print --enable-print-preview" on the command line. To enable in ChromeOS open about:flags and enable print preview. This first pass extends the print preview UI to retrieve a printer list from cloud print and to allow printing to a cloud print printer. Limitations/known issues: Sign in opens a new tab and requires the print preview page to be refreshed after sign in. Only pulls the first 10 GCP printers. Job settings are very limited. Only sets color and only for a limited set of printers. BUG=80004 TEST= When running with default flags the only visible change should be that "Manage Printers" is now "Manage Local Printers" With flags set as above there should be new entries in the printer selection dropdown allowing the use of cloud printers. It should be possible to sign in to cloud print, open the management page, and be able to print documents to cloud printers. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92275

Patch Set 1 #

Patch Set 2 : More polish #

Patch Set 3 : Code cleanup #

Patch Set 4 : Fixed minor issue with print caps #

Patch Set 5 : Fix bad merge #

Total comments: 14

Patch Set 6 : review feedback. Started caps. #

Patch Set 7 : Checkpoint before weekend. #

Patch Set 8 : Sorting out several merges #

Patch Set 9 : Get basic print ticket working #

Patch Set 10 : Lint cleanup and comments #

Patch Set 11 : Lint! #

Total comments: 18

Patch Set 12 : Review feedback #

Total comments: 14

Patch Set 13 : Review feedback #

Total comments: 1

Patch Set 14 : Latest merge. Removed whitelist code.wq #

Total comments: 15

Patch Set 15 : Merge #

Patch Set 16 : Review feedback #

Patch Set 17 : More merges. Made printer list calls async. #

Patch Set 18 : Merge. #

Patch Set 19 : Fixed stickiness #

Patch Set 20 : Code cleanup #

Patch Set 21 : Lint #

Patch Set 22 : Resolved new conflictswq #

Unified diffs Side-by-side diffs Delta from patch set Stats (+983 lines, -75 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 17 18 19 20 21 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/print_preview/print_preview.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -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 17 18 19 20 21 15 chunks +294 lines, -38 lines 0 comments Download
A chrome/browser/resources/print_preview/print_preview_cloud.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +364 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chrome_web_ui_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -2 lines 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 +14 lines, -0 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 17 18 19 20 21 5 chunks +24 lines, -3 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 17 18 19 20 21 12 chunks +153 lines, -22 lines 0 comments Download
M chrome/renderer/print_web_view_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +10 lines, -1 line 0 comments Download
M chrome/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +45 lines, -4 lines 0 comments Download
A printing/backend/print_backend_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +60 lines, -0 lines 0 comments Download
M printing/print_job_constants.h View 1 2 3 4 5 6 7 8 9 10 11 17 1 chunk +1 line, -0 lines 0 comments Download
M printing/print_job_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 17 1 chunk +3 lines, -0 lines 0 comments Download
M printing/printing.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Albert Bodenhamer
9 years, 7 months ago (2011-05-24 21:50:52 UTC) #1
Lei Zhang
Hi Albert, Thanks for working on this. There's a lot of churn in the print ...
9 years, 7 months ago (2011-05-24 22:33:08 UTC) #2
Albert Bodenhamer
Sure thing. I'm working on a second CL based on this one. I may merge ...
9 years, 7 months ago (2011-05-24 22:40:13 UTC) #3
Lei Zhang
At a quick glance, nothing fired off an alarm with the exception of the change ...
9 years, 7 months ago (2011-05-24 22:46:45 UTC) #4
sanjeevr
Looks mostly OK, some minor comments. http://codereview.chromium.org/7038028/diff/17001/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): http://codereview.chromium.org/7038028/diff/17001/chrome/browser/about_flags.cc#newcode177 chrome/browser/about_flags.cc:177: kOsMac | kOsWin ...
9 years, 7 months ago (2011-05-24 23:21:25 UTC) #5
Scott Byer
And I'd add arv@ as a reviewer for the WebUI portions. http://codereview.chromium.org/7038028/diff/17001/base/json/json_writer.cc File base/json/json_writer.cc (right): ...
9 years, 7 months ago (2011-05-24 23:40:31 UTC) #6
Albert Bodenhamer
I've responded to the original comments and added arv as a reviewer. I've also added ...
9 years, 6 months ago (2011-06-09 17:33:11 UTC) #7
Lei Zhang
FYI, I think you'll need to rebase again. The print preview code is still a ...
9 years, 6 months ago (2011-06-09 21:23:30 UTC) #8
Albert Bodenhamer
Thanks for the feedback. I've been doing a pull/merge about once a day so I ...
9 years, 6 months ago (2011-06-10 01:29:36 UTC) #9
Scott Byer
LGTM On 2011/06/10 01:29:36, Albert Bodenhamer wrote: > Thanks for the feedback. I've been doing ...
9 years, 6 months ago (2011-06-10 17:40:04 UTC) #10
sanjeevr
http://codereview.chromium.org/7038028/diff/27005/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/7038028/diff/27005/chrome/browser/resources/print_preview.js#newcode171 chrome/browser/resources/print_preview.js:171: return; Nit: Is there a way to restructure this ...
9 years, 6 months ago (2011-06-10 18:13:48 UTC) #11
dpapad
http://codereview.chromium.org/7038028/diff/27005/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/7038028/diff/27005/chrome/browser/resources/print_preview.js#newcode245 chrome/browser/resources/print_preview.js:245: fadeInElement($('landscape-option')); nit: Could you use the more compressed form? ...
9 years, 6 months ago (2011-06-10 20:29:06 UTC) #12
Albert Bodenhamer
I've responded to comments, but I'm going to need to address the whitelisting issues with ...
9 years, 6 months ago (2011-06-10 23:13:45 UTC) #13
Albert Bodenhamer
I've removed the whitelisting code for allowing XHRs to cloudprint servers and done another merge. ...
9 years, 6 months ago (2011-06-14 00:52:44 UTC) #14
Lei Zhang
LGTM with nits below. http://codereview.chromium.org/7038028/diff/32001/chrome/browser/ui/webui/print_preview_handler.cc File chrome/browser/ui/webui/print_preview_handler.cc (right): http://codereview.chromium.org/7038028/diff/32001/chrome/browser/ui/webui/print_preview_handler.cc#newcode567 chrome/browser/ui/webui/print_preview_handler.cc:567: void PrintPreviewHandler::HandleManageCloudPrint(const ListValue* args) { ...
9 years, 6 months ago (2011-06-14 01:08:08 UTC) #15
dpapad
There has been a refactoring of print_preview.js and it is in the commit queue http://codereview.chromium.org/7003153/. ...
9 years, 6 months ago (2011-06-14 01:14:46 UTC) #16
Albert Bodenhamer
I've updated based on review feedback. http://codereview.chromium.org/7038028/diff/32001/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/7038028/diff/32001/chrome/browser/resources/print_preview.js#newcode10 chrome/browser/resources/print_preview.js:10: var maxCloudPrinters = ...
9 years, 6 months ago (2011-06-14 19:43:54 UTC) #17
dpapad
LGTM for the js part.
9 years, 6 months ago (2011-06-14 20:36:52 UTC) #18
sanjeevr
LGTM http://codereview.chromium.org/7038028/diff/24007/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/7038028/diff/24007/chrome/browser/resources/print_preview.js#newcode222 chrome/browser/resources/print_preview.js:222: return; You forgot setting skip_refresh to true here ...
9 years, 6 months ago (2011-06-15 20:24:36 UTC) #19
Albert Bodenhamer
Server changes are now live. I've also added support for a cloud printer to be ...
9 years, 5 months ago (2011-07-11 23:39:27 UTC) #20
Scott Byer
LGTM On 2011/07/11 23:39:27, Albert Bodenhamer wrote: > Server changes are now live. I've also ...
9 years, 5 months ago (2011-07-12 00:04:34 UTC) #21
Albert Bodenhamer
If there are no objections I'll submit after lunch
9 years, 5 months ago (2011-07-12 17:06:50 UTC) #22
commit-bot: I haz the power
Can't apply patch for file chrome/browser/ui/webui/print_preview_handler.h. While running patch -p1 --forward --force; patching file chrome/browser/ui/webui/print_preview_handler.h ...
9 years, 5 months ago (2011-07-12 20:05:35 UTC) #23
commit-bot: I haz the power
9 years, 5 months ago (2011-07-13 00:01:30 UTC) #24
Change committed as 92275

Powered by Google App Engine
This is Rietveld 408576698