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

Issue 1148383002: Add onGetUsbPrinterInfoRequested event to printerProvider API. (Closed)

Created:
5 years, 7 months ago by Reilly Grant (use Gerrit)
Modified:
5 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, arv+watch_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add onGetUsbPrinterInfoRequested event to printerProvider API. This event allows the system to request a printerProvider for information about a USB printer. This can be used when the app has recently been given permission to access the device, after the printerProvider has already provided an regular printer enumeration through onGetUsbPrintersRequested. BUG=468955 Committed: https://crrev.com/7840286891fbebe83603cc1c73e210c886ea1a76 Cr-Commit-Position: refs/heads/master@{#332452}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Split out print_preview integration into a separate patch. #

Total comments: 2

Patch Set 3 : Only include the permission granting part in this patch. #

Total comments: 8

Patch Set 4 : Remove permission granting language from printerProvider API. #

Patch Set 5 : Again, split out the print_preview integration into a separate patch. #

Total comments: 1

Patch Set 6 : Fix compilation of extension_printer_handler_unittest.cc. #

Total comments: 4

Patch Set 7 : No {}. :( #

Patch Set 8 : Switch away from NOTREACHED() and document API expectations. #

Total comments: 2

Patch Set 9 : Clean up note about printer enumeration. #

Patch Set 10 : Rebased. #

Patch Set 11 : Fix Windows build. #

Patch Set 12 : Rebased. #

Patch Set 13 : Rebased to GUID changes. #

Patch Set 14 : Remove unnecessary "usb_printers" manifest key. #

Patch Set 15 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+413 lines, -26 lines) Patch
M chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -0 lines 0 comments Download
M extensions/browser/api/printer_provider/printer_provider_api.h View 1 2 3 4 chunks +16 lines, -1 line 0 comments Download
M extensions/browser/api/printer_provider/printer_provider_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +151 lines, -24 lines 0 comments Download
M extensions/browser/api/printer_provider/printer_provider_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +92 lines, -1 line 0 comments Download
M extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h View 1 2 3 3 chunks +25 lines, -0 lines 0 comments Download
M extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc View 1 2 3 2 chunks +30 lines, -0 lines 0 comments Download
M extensions/browser/api/printer_provider_internal/printer_provider_internal_api_observer.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/api/printer_provider.idl View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -0 lines 0 comments Download
M extensions/common/api/printer_provider_internal.idl View 1 chunk +7 lines, -0 lines 0 comments Download
M extensions/renderer/resources/printer_provider_custom_bindings.js View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A extensions/test/data/api_test/printer_provider/usb_printers/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
A extensions/test/data/api_test/printer_provider/usb_printers/test.js View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (17 generated)
Reilly Grant (use Gerrit)
Vitaly, please take a look at the bulk of this patch. Alexei, histograms please. Ben, ...
5 years, 7 months ago (2015-05-21 00:28:31 UTC) #5
Vitaly Buka (NO REVIEWS)
+tbarzic Hi Reilly, I think this patch deserve to be split in two parts: 1. ...
5 years, 7 months ago (2015-05-21 00:38:02 UTC) #8
Vitaly Buka (NO REVIEWS)
+tbarzic Hi Reilly, I think this patch deserve to be split in two parts: 1. ...
5 years, 7 months ago (2015-05-21 00:38:02 UTC) #9
Reilly Grant (use Gerrit)
On 2015/05/21 00:38:02, Vitaly Buka wrote: > +tbarzic > > Hi Reilly, I think this ...
5 years, 7 months ago (2015-05-21 00:51:19 UTC) #10
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/1148383002/diff/20001/extensions/common/api/printer_provider.idl File extensions/common/api/printer_provider.idl (right): https://codereview.chromium.org/1148383002/diff/20001/extensions/common/api/printer_provider.idl#newcode86 extensions/common/api/printer_provider.idl:86: // undefined that indicates that the application has determined ...
5 years, 7 months ago (2015-05-21 00:52:02 UTC) #11
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/1148383002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/1148383002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js#newcode1013 chrome/browser/resources/print_preview/data/destination_store.js:1013: var filteredPrinters = event.printers.filter(function(printer) { this piece for another ...
5 years, 7 months ago (2015-05-21 00:54:43 UTC) #12
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1148383002/diff/20001/extensions/common/api/printer_provider.idl File extensions/common/api/printer_provider.idl (right): https://codereview.chromium.org/1148383002/diff/20001/extensions/common/api/printer_provider.idl#newcode86 extensions/common/api/printer_provider.idl:86: // undefined that indicates that the application has determined ...
5 years, 7 months ago (2015-05-21 00:58:22 UTC) #13
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1148383002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/1148383002/diff/40001/chrome/browser/resources/print_preview/data/destination_store.js#newcode1013 chrome/browser/resources/print_preview/data/destination_store.js:1013: var filteredPrinters = event.printers.filter(function(printer) { On 2015/05/21 00:54:43, Vitaly ...
5 years, 7 months ago (2015-05-21 00:59:55 UTC) #14
Vitaly Buka (NO REVIEWS)
> I could add this event to chrome.usb but I would no longer want it ...
5 years, 7 months ago (2015-05-21 01:52:14 UTC) #15
Reilly Grant (use Gerrit)
On 2015/05/21 01:52:14, Vitaly Buka wrote: > > I could add this event to chrome.usb ...
5 years, 7 months ago (2015-05-21 02:38:36 UTC) #16
Vitaly Buka (NO REVIEWS)
>> to provide a good integration experience for USB printer providers. Actually it was for ...
5 years, 7 months ago (2015-05-21 05:32:21 UTC) #17
Reilly Grant (use Gerrit)
On 2015/05/21 05:32:21, Vitaly Buka wrote: > >> to provide a good integration experience for ...
5 years, 7 months ago (2015-05-22 21:06:36 UTC) #18
Vitaly Buka (NO REVIEWS)
> The reason I chose to go with a single new USB related function was ...
5 years, 7 months ago (2015-05-22 21:48:52 UTC) #19
tbarzic
On 2015/05/22 21:48:52, Vitaly Buka wrote: > > The reason I chose to go with ...
5 years, 7 months ago (2015-05-22 22:13:34 UTC) #20
Reilly Grant (use Gerrit)
On 2015/05/22 22:13:34, tbarzic wrote: > On 2015/05/22 21:48:52, Vitaly Buka wrote: > > > ...
5 years, 7 months ago (2015-05-22 22:16:31 UTC) #21
Alexei Svitkine (slow)
histograms.xml lgtm, did not look at anything else
5 years, 7 months ago (2015-05-25 15:24:12 UTC) #22
Reilly Grant (use Gerrit)
Okay, this patch now only contains the permission granting portion of the feature.
5 years, 7 months ago (2015-05-26 23:17:55 UTC) #23
tbarzic
https://codereview.chromium.org/1148383002/diff/60001/extensions/browser/api/printer_provider/printer_provider_api.cc File extensions/browser/api/printer_provider/printer_provider_api.cc (right): https://codereview.chromium.org/1148383002/diff/60001/extensions/browser/api/printer_provider/printer_provider_api.cc#newcode721 extensions/browser/api/printer_provider/printer_provider_api.cc:721: pending_usb_printer_info_requests_[extension->id()].Complete(request_id, Can you reuse code from PrinterProviderAPIImpl::OnGetPrintersResult for generating ...
5 years, 7 months ago (2015-05-27 00:11:03 UTC) #24
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1148383002/diff/60001/extensions/browser/api/printer_provider/printer_provider_api.cc File extensions/browser/api/printer_provider/printer_provider_api.cc (right): https://codereview.chromium.org/1148383002/diff/60001/extensions/browser/api/printer_provider/printer_provider_api.cc#newcode721 extensions/browser/api/printer_provider/printer_provider_api.cc:721: pending_usb_printer_info_requests_[extension->id()].Complete(request_id, On 2015/05/27 00:11:03, tbarzic wrote: > Can you ...
5 years, 6 months ago (2015-05-28 21:04:11 UTC) #25
Vitaly Buka (NO REVIEWS)
lgtm lgtm https://codereview.chromium.org/1148383002/diff/100001/extensions/browser/api/printer_provider/printer_provider_api.cc File extensions/browser/api/printer_provider/printer_provider_api.cc (right): https://codereview.chromium.org/1148383002/diff/100001/extensions/browser/api/printer_provider/printer_provider_api.cc#newcode480 extensions/browser/api/printer_provider/printer_provider_api.cc:480: if (it == pending_requests_.end()) { {} here ...
5 years, 6 months ago (2015-05-28 21:51:28 UTC) #26
Vitaly Buka (NO REVIEWS)
lgtm https://codereview.chromium.org/1148383002/diff/100001/extensions/browser/api/printer_provider/printer_provider_api.cc File extensions/browser/api/printer_provider/printer_provider_api.cc (right): https://codereview.chromium.org/1148383002/diff/100001/extensions/browser/api/printer_provider/printer_provider_api.cc#newcode480 extensions/browser/api/printer_provider/printer_provider_api.cc:480: if (it == pending_requests_.end()) { {} here is ...
5 years, 6 months ago (2015-05-28 21:51:28 UTC) #27
tbarzic
https://codereview.chromium.org/1148383002/diff/120001/chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc File chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc (right): https://codereview.chromium.org/1148383002/diff/120001/chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc#newcode304 chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc:304: NOTREACHED(); s/NOTREACHED()/ADD_FAILURE() << "Not reached"/ (I usually try to ...
5 years, 6 months ago (2015-05-28 22:20:50 UTC) #28
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1148383002/diff/120001/chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc File chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc (right): https://codereview.chromium.org/1148383002/diff/120001/chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc#newcode304 chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc:304: NOTREACHED(); On 2015/05/28 22:20:50, tbarzic wrote: > s/NOTREACHED()/ADD_FAILURE() << ...
5 years, 6 months ago (2015-05-28 22:38:58 UTC) #29
tbarzic
lgtm https://codereview.chromium.org/1148383002/diff/160001/extensions/common/api/printer_provider.idl File extensions/common/api/printer_provider.idl (right): https://codereview.chromium.org/1148383002/diff/160001/extensions/common/api/printer_provider.idl#newcode81 extensions/common/api/printer_provider.idl:81: // should be returned in the onGetPrintersRequested event. ...
5 years, 6 months ago (2015-05-28 22:42:23 UTC) #30
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1148383002/diff/160001/extensions/common/api/printer_provider.idl File extensions/common/api/printer_provider.idl (right): https://codereview.chromium.org/1148383002/diff/160001/extensions/common/api/printer_provider.idl#newcode81 extensions/common/api/printer_provider.idl:81: // should be returned in the onGetPrintersRequested event. On ...
5 years, 6 months ago (2015-05-28 22:47:01 UTC) #31
not at google - send to devlin
lgtm
5 years, 6 months ago (2015-06-01 18:30:00 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148383002/200001
5 years, 6 months ago (2015-06-01 19:28:09 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/64488)
5 years, 6 months ago (2015-06-01 20:32:15 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148383002/220001
5 years, 6 months ago (2015-06-01 21:00:04 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/56902) linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 6 months ago (2015-06-01 21:07:38 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148383002/190015
5 years, 6 months ago (2015-06-01 23:35:04 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148383002/290001
5 years, 6 months ago (2015-06-02 18:19:23 UTC) #49
commit-bot: I haz the power
Committed patchset #15 (id:290001)
5 years, 6 months ago (2015-06-02 19:52:36 UTC) #50
commit-bot: I haz the power
5 years, 6 months ago (2015-06-02 19:53:44 UTC) #51
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/7840286891fbebe83603cc1c73e210c886ea1a76
Cr-Commit-Position: refs/heads/master@{#332452}

Powered by Google App Engine
This is Rietveld 408576698