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

Unified Diff: extensions/common/api/printer_provider_internal.idl

Issue 973993003: Instead of ArrayBuffer, pass blob with printerProvider.onPrintRequested (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/common/api/printer_provider_internal.idl
diff --git a/extensions/common/api/printer_provider_internal.idl b/extensions/common/api/printer_provider_internal.idl
index 702cc99b56fa4428b0ac2f42fd8ee2ffbbcc666f..dba73cde84590f45a239c34095f4225ff2776acb 100644
--- a/extensions/common/api/printer_provider_internal.idl
+++ b/extensions/common/api/printer_provider_internal.idl
@@ -16,6 +16,21 @@ namespace printerProviderInternal {
// Same as in printerProvider.PrintError enum API.
enum PrintError { OK, FAILED, INVALID_TICKET, INVALID_DATA };
+ // Information needed by a renderer to create a blob instance.
+ dictionary BlobInfo {
+ // The blob UUID.
+ DOMString blobUuid;
+
+ // The blob content type.
+ DOMString type;
+
+ // The blob size.
+ long size;
not at google - send to devlin 2015/03/04 21:54:49 Wow, big print job :-)
+ };
+
+ // Callback carrying information needed by a renderer to create a blob.
+ callback BlobCallback = void(BlobInfo blobInfo);
+
interface Functions {
// Runs callback to printerProvider.onGetPrintersRequested event.
// |requestId|: Parameter identifying the event instance for which the
@@ -35,6 +50,15 @@ namespace printerProviderInternal {
// callback is run.
// |error|: The requested print job result.
void reportPrintResult(long request_id, optional PrintError error);
+
+ // Gets information needed to create a print data blob for a print request.
+ // The blob will be dispatched to the extension via
+ // printerProvider.onPrintRequested event.
+ // |requestId|: The request id for the print request for which data is
+ // needed.
+ // |callback|: Callback called with the information needed to create a blob
+ // of print data.
+ void getPrintData(long requestId, BlobCallback callback);
};
};

Powered by Google App Engine
This is Rietveld 408576698