OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // <p>The <code>chrome.printerProvider</code> API exposes events used by print | 5 // <p>The <code>chrome.printerProvider</code> API exposes events used by print |
6 // manager to query printers controlled by extensions, to query their | 6 // manager to query printers controlled by extensions, to query their |
7 // capabilities and to submit print jobs to these printers. | 7 // capabilities and to submit print jobs to these printers. |
8 // <p/> | 8 // <p/> |
9 // <p>Available only on dev channel since Chrome 42.</p> | 9 // <p>Available only on dev channel since Chrome 42.</p> |
10 namespace printerProvider { | 10 namespace printerProvider { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Print ticket in | 46 // Print ticket in |
47 // <a href="https://developers.google.com/cloud-print/docs/cdd#cjt"> | 47 // <a href="https://developers.google.com/cloud-print/docs/cdd#cjt"> |
48 // CJT format</a>. | 48 // CJT format</a>. |
49 object ticket; | 49 object ticket; |
50 | 50 |
51 // The document content type. Supported formats are | 51 // The document content type. Supported formats are |
52 // <code>"application/pdf"</code> and <code>"image/pwg-raster"</code>. | 52 // <code>"application/pdf"</code> and <code>"image/pwg-raster"</code>. |
53 DOMString contentType; | 53 DOMString contentType; |
54 | 54 |
55 // Buffer containing the document to print. Format must match |contentType|. | 55 // Blob containing the document data to print. Format must match |
56 ArrayBuffer document; | 56 // |contentType|. |
| 57 [instanceOf=Blob] object document; |
57 }; | 58 }; |
58 | 59 |
59 callback PrintersCallback = void(PrinterInfo[] printerInfo); | 60 callback PrintersCallback = void(PrinterInfo[] printerInfo); |
60 | 61 |
61 // |capabilities|: Device capabilities in | 62 // |capabilities|: Device capabilities in |
62 // <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD | 63 // <a href="https://developers.google.com/cloud-print/docs/cdd#cdd">CDD |
63 // format</a>. | 64 // format</a>. |
64 callback CapabilitiesCallback = void(object capabilities); | 65 callback CapabilitiesCallback = void(object capabilities); |
65 | 66 |
66 callback PrintCallback = void(PrintError result); | 67 callback PrintCallback = void(PrintError result); |
(...skipping 15 matching lines...) Expand all Loading... |
82 | 83 |
83 // Event fired when print manager requests printing. | 84 // Event fired when print manager requests printing. |
84 // |printJob|: The printing request parameters. | 85 // |printJob|: The printing request parameters. |
85 // |resultCallback|: Callback that should be called when the printing | 86 // |resultCallback|: Callback that should be called when the printing |
86 // request is completed. | 87 // request is completed. |
87 static void onPrintRequested(PrintJob printJob, | 88 static void onPrintRequested(PrintJob printJob, |
88 PrintCallback resultCallback); | 89 PrintCallback resultCallback); |
89 }; | 90 }; |
90 }; | 91 }; |
91 | 92 |
OLD | NEW |