OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 module printing.mojom; | 5 module printing.mojom; |
6 | 6 |
7 const string kServiceName = "pdf_compositor"; | 7 const string kServiceName = "pdf_compositor"; |
8 | 8 |
9 // TODO(weili): Add support for printing frames from different processes. | 9 // TODO(weili): Add support for printing frames from different processes. |
10 interface PdfCompositor { | 10 interface PdfCompositor { |
| 11 // The status of CompositePdf execution. |
| 12 enum Status { |
| 13 SUCCESS, |
| 14 HANDLE_MAP_ERROR, |
| 15 CONTENT_FORMAT_ERROR, |
| 16 COMPOSTING_FAILURE, |
| 17 }; |
| 18 |
11 // Currently directly convert passed in page data to a PDF file. | 19 // Currently directly convert passed in page data to a PDF file. |
12 // |sk_handle| points to a buffer of a Skia MultiPictureDocument. | 20 // |sk_handle| points to a buffer of a Skia MultiPictureDocument. |
13 // |pdf_handle| points to the generated PDF file buffer. | 21 // |status| records the function execution status. |
| 22 // |pdf_handle| points to the generated PDF file buffer upon success. |
14 CompositePdf(handle<shared_buffer> sk_handle) | 23 CompositePdf(handle<shared_buffer> sk_handle) |
15 => (handle<shared_buffer> pdf_handle); | 24 => (Status status, handle<shared_buffer>? pdf_handle); |
16 }; | 25 }; |
OLD | NEW |