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

Issue 2825153002: Update CUPS settings UI to allow USB printers to be added via discovery. (Closed)

Created:
3 years, 8 months ago by Carlson
Modified:
3 years, 7 months ago
Reviewers:
stevenjb, xdai1
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update CUPS settings UI to allow USB printers to be added via discovery. This re-enables the "discovery" dialog when a user asks to add a printer; the dialog is populated with any USB printers that could not be set up automatically. (Eventually, this will also be populated with auto-discovered network printers). If the user selects a printer from the list, they are taken to the manufacturer-model dialog to select a driver. This change also alters a button in the ui. Right now, there's always an "Add printer manually" button in the manufacturer-model dialog. But this *actually* functions as a "back" button when adding a printer manually, as it takes you back to the previous dialog with the values you entered there, and, in the discovery case, this button doesn't make sense as it doesn't have previous values to take you back to. So the button has been re-texted with 'back', and now takes you to the previous dialog, whether that was discovery or manual addition. Finally, this change also fixes a few things in URI handling for usb printers in cups_printers_handler so that, when we add a printer from the manufacturer-model dialog, we get a correct URI to do so. BUG=616866 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2825153002 Cr-Commit-Position: refs/heads/master@{#471858} Committed: https://chromium.googlesource.com/chromium/src/+/2ed79b998d112e09fc22678cd4bd838a465ee569

Patch Set 1 #

Total comments: 7

Patch Set 2 : Address xdai comments, rebase #

Patch Set 3 : Remove extra copy code #

Total comments: 14

Patch Set 4 : Address xdai comments. #

Total comments: 2

Patch Set 5 : Single Canonical CupsPrinterInfo, consistent back button #

Patch Set 6 : Update CUPS settings UI to allow USB printers to be added via discovery. #

Total comments: 18

Patch Set 7 : Address more xdai comments #

Patch Set 8 : One more round of xdai comments. #

Total comments: 2

Patch Set 9 : Fix js compile error in unused path #

Patch Set 10 : Fixup overlooked test revealed by CQ. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -92 lines) Patch
M chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html View 1 2 3 4 5 6 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js View 1 2 3 4 5 6 7 8 15 chunks +62 lines, -72 lines 0 comments Download
M chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc View 1 3 chunks +17 lines, -7 lines 0 comments Download
M chrome/test/data/webui/settings/cups_printer_page_tests.js View 1 2 3 4 5 6 7 8 9 4 chunks +33 lines, -7 lines 0 comments Download

Messages

Total messages: 46 (24 generated)
Carlson
Daisy, can you take an initial look at this and tell me how messed up ...
3 years, 8 months ago (2017-04-18 21:05:02 UTC) #3
Carlson
On 2017/04/18 21:05:02, Carlson wrote: > Daisy, can you take an initial look at this ...
3 years, 8 months ago (2017-04-24 19:01:33 UTC) #4
xdai1
On 2017/04/24 19:01:33, Carlson wrote: > On 2017/04/18 21:05:02, Carlson wrote: > > Daisy, can ...
3 years, 8 months ago (2017-04-24 19:15:19 UTC) #5
chromium-reviews
Don't stress about getting it done today if that's not convenient, just wanted to make ...
3 years, 8 months ago (2017-04-24 19:22:59 UTC) #6
xdai1
https://codereview.chromium.org/2825153002/diff/1/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/1/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode56 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:56: notify: true, I think put the new property newPrinter ...
3 years, 8 months ago (2017-04-24 21:42:12 UTC) #7
Carlson
Some responses, some questions. PTAL? https://codereview.chromium.org/2825153002/diff/1/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/1/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode56 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:56: notify: true, On 2017/04/24 ...
3 years, 7 months ago (2017-05-01 20:59:49 UTC) #8
xdai1
Please see my inline comment. Btw: I didn't see the new patch. Did you forget ...
3 years, 7 months ago (2017-05-02 17:25:08 UTC) #9
Carlson
On 2017/05/02 17:25:08, xdai1 wrote: > Please see my inline comment. > > Btw: I ...
3 years, 7 months ago (2017-05-09 22:01:13 UTC) #10
xdai1
Hey Carlson, I found it's a little hard for me to explain it clearly in ...
3 years, 7 months ago (2017-05-10 20:12:53 UTC) #11
Carlson
> So I wrote a draft CL to illustrate my thought: > https://codereview.chromium.org/2876563003/. I didn't ...
3 years, 7 months ago (2017-05-10 21:28:18 UTC) #12
xdai1
On 2017/05/10 21:28:18, Carlson wrote: > I think the advantage of what you're doing is ...
3 years, 7 months ago (2017-05-11 00:25:10 UTC) #13
Carlson
Appreciate your patience and help on this. PTAL? https://codereview.chromium.org/2825153002/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html (right): https://codereview.chromium.org/2825153002/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html#newcode320 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html:320: on-tap="switchToManualAddDialog_" ...
3 years, 7 months ago (2017-05-11 22:08:58 UTC) #15
xdai1
Please see my inline comments. Thanks for bearing with me! https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode142 ...
3 years, 7 months ago (2017-05-11 22:50:28 UTC) #16
Carlson
PTAL? https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode142 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:142: this.selectedPrinter.printerPPDPath = ''; On 2017/05/11 22:50:28, xdai1 wrote: ...
3 years, 7 months ago (2017-05-11 23:57:11 UTC) #17
Carlson
+stevenjb because I think xdai is almost satisfied and I'm hoping to catch M60 here.
3 years, 7 months ago (2017-05-12 00:02:06 UTC) #19
xdai1
Almost! https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode142 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:142: this.selectedPrinter.printerPPDPath = ''; On 2017/05/11 23:57:10, Carlson wrote: ...
3 years, 7 months ago (2017-05-12 00:30:43 UTC) #20
Carlson
https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode420 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:420: this.switchDialog_( On 2017/05/12 00:30:43, xdai1 wrote: > On 2017/05/11 ...
3 years, 7 months ago (2017-05-12 17:12:46 UTC) #21
stevenjb
owner lgtm, but please wait for lg from xdai@ https://codereview.chromium.org/2825153002/diff/140001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc File chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc (right): https://codereview.chromium.org/2825153002/diff/140001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc#newcode217 chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc:217: ...
3 years, 7 months ago (2017-05-12 17:19:09 UTC) #22
xdai1
lgtm. Thanks for doing this! https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode420 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:420: this.switchDialog_( On 2017/05/12 17:12:46, ...
3 years, 7 months ago (2017-05-12 17:56:55 UTC) #23
Carlson
Thanks all! https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js (right): https://codereview.chromium.org/2825153002/diff/100001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js#newcode420 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js:420: this.switchDialog_( On 2017/05/12 17:56:55, xdai1 wrote: > ...
3 years, 7 months ago (2017-05-12 18:14:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2825153002/180001
3 years, 7 months ago (2017-05-15 18:48:29 UTC) #43
commit-bot: I haz the power
3 years, 7 months ago (2017-05-15 19:13:23 UTC) #46
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/2ed79b998d112e09fc22678cd4bd...

Powered by Google App Engine
This is Rietveld 408576698