OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // printerProviderInternal | 5 // printerProviderInternal |
6 // Internal API used to run callbacks passed to chrome.printerProvider API | 6 // Internal API used to run callbacks passed to chrome.printerProvider API |
7 // events. | 7 // events. |
8 // When dispatching a chrome.printerProvider API event, its arguments will be | 8 // When dispatching a chrome.printerProvider API event, its arguments will be |
9 // massaged in custom bindings so a callback is added. The callback uses | 9 // massaged in custom bindings so a callback is added. The callback uses |
10 // chrome.printerProviderInternal API to report the event results. | 10 // chrome.printerProviderInternal API to report the event results. |
11 // In order to identify the event for which the callback is called, the event | 11 // In order to identify the event for which the callback is called, the event |
12 // is internally dispatched having a requestId argument (which is removed from | 12 // is internally dispatched having a requestId argument (which is removed from |
13 // the argument list before the event actually reaches the event listeners). The | 13 // the argument list before the event actually reaches the event listeners). The |
14 // requestId is forwarded to the chrome.printerProviderInternal API functions. | 14 // requestId is forwarded to the chrome.printerProviderInternal API functions. |
15 namespace printerProviderInternal { | 15 [use_movable_types=true] namespace printerProviderInternal { |
16 // Same as in printerProvider.PrintError enum API. | 16 // Same as in printerProvider.PrintError enum API. |
17 enum PrintError { OK, FAILED, INVALID_TICKET, INVALID_DATA }; | 17 enum PrintError { OK, FAILED, INVALID_TICKET, INVALID_DATA }; |
18 | 18 |
19 // Information needed by a renderer to create a blob instance. | 19 // Information needed by a renderer to create a blob instance. |
20 dictionary BlobInfo { | 20 dictionary BlobInfo { |
21 // The blob UUID. | 21 // The blob UUID. |
22 DOMString blobUuid; | 22 DOMString blobUuid; |
23 | 23 |
24 // The blob content type. | 24 // The blob content type. |
25 DOMString type; | 25 DOMString type; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // The blob will be dispatched to the extension via | 62 // The blob will be dispatched to the extension via |
63 // printerProvider.onPrintRequested event. | 63 // printerProvider.onPrintRequested event. |
64 // |requestId|: The request id for the print request for which data is | 64 // |requestId|: The request id for the print request for which data is |
65 // needed. | 65 // needed. |
66 // |callback|: Callback called with the information needed to create a blob | 66 // |callback|: Callback called with the information needed to create a blob |
67 // of print data. | 67 // of print data. |
68 void getPrintData(long requestId, BlobCallback callback); | 68 void getPrintData(long requestId, BlobCallback callback); |
69 }; | 69 }; |
70 }; | 70 }; |
71 | 71 |
OLD | NEW |