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

Unified Diff: components/printing/service/public/interfaces/pdf_compositor.mojom

Issue 2919823004: Add error handling and unit test for pdf compositor service (Closed)
Patch Set: rebase Created 3 years, 5 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: components/printing/service/public/interfaces/pdf_compositor.mojom
diff --git a/components/printing/service/public/interfaces/pdf_compositor.mojom b/components/printing/service/public/interfaces/pdf_compositor.mojom
index 67f9448d947d274099cdc2378c63d9bc321065c4..ad8b55499022ae781cea8077a48dc9c294c5652b 100644
--- a/components/printing/service/public/interfaces/pdf_compositor.mojom
+++ b/components/printing/service/public/interfaces/pdf_compositor.mojom
@@ -8,9 +8,18 @@ const string kServiceName = "pdf_compositor";
// TODO(weili): Add support for printing frames from different processes.
interface PdfCompositor {
+ // The status of CompositePdf execution.
+ enum Status {
+ SUCCESS,
+ HANDLE_MAP_ERROR,
+ CONTENT_FORMAT_ERROR,
+ COMPOSTING_FAILURE,
+ };
+
// Currently directly convert passed in page data to a PDF file.
// |sk_handle| points to a buffer of a Skia MultiPictureDocument.
- // |pdf_handle| points to the generated PDF file buffer.
+ // |status| records the function execution status.
+ // |pdf_handle| points to the generated PDF file buffer upon success.
CompositePdf(handle<shared_buffer> sk_handle)
- => (handle<shared_buffer> pdf_handle);
+ => (Status status, handle<shared_buffer>? pdf_handle);
};
« no previous file with comments | « components/printing/service/public/cpp/pdf_compositor_client.cc ('k') | components/printing/service/test_service_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698