DescriptionInstead of ArrayBuffer, pass blob with printerProvider.onPrintRequested
This will allow us to pass larger amout of data to the extension. With
array buffer sending more than ~60MB documents would crash the renderer.
For data converted to PWG raster, the data is written to a temp file
during conversion. To avoid reading the data back into memory, use
file backed blob to represent this data.
The blob passed to the extension is created in the API custom bindings
using newly added chrome.printerProviderInternal.getPrintData function,
which creates the blob and returns data needed by the renderer to take
the ownership of the blob.
For creating file backed blob in printer_provider_internal_api.cc,
this add BrowserContext::CreateFileBackedBlob (analogous to existing
CreateMemoryBackedBlob) method, which can be used from extensions/
BUG=461115
TEST=Manually verified that a ~150MB PWG raster data can be passed to a
test preintrProvider extension.
extensions_browsertests --gtest_filter=PrinterProviderAPI*
unit_tests --gtest_filter=ExtensionPrinterHandler*
Committed: https://crrev.com/db71268248fb1221faa828cbc8dcba7fc2218c4a
Cr-Commit-Position: refs/heads/master@{#319416}
Patch Set 1 #Patch Set 2 : . #
Total comments: 7
Patch Set 3 : kalman feedback #
Total comments: 2
Patch Set 4 : vitaly's feedback #Patch Set 5 : rebase & add ext fun histogram #Messages
Total messages: 17 (4 generated)
|