Hook up chrome.printerProvider.onGetPrintersRequested
Introduces PrinterProviderAPI::DispatchGetPritersRequested.
The method dispatches printerProvider.onGetPrintersRequested and
creates new request context for the event.
The context contains the event callback and list of extensions that are
yet expected to reply to the event. It's identified by requestId. The
request id is passed to the event and to
printerProviderInternal.reportPrinters which gets called when the
extension responds to the event.
PrinterProviderAPI observes PrinterProviderInternalAPI for function
calls, and runs DispatchGetPrintersRequested callback whenever
reportPrinters is called (i.e. the callback is run once for each
extension that responds to the event).
Once all the extensions that listen to the event respond, the request
context gets removed.
BUG=408772
Review URL: https://codereview.chromium.org/
868553002
Cr-Commit-Position: refs/heads/master@{#312705}