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

Unified Diff: chrome/browser/printing/print_preview_message_handler.h

Issue 2920013002: Use pdf compositor service for printing when OOPIF is enabled
Patch Set: rebase Created 3 years, 3 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: chrome/browser/printing/print_preview_message_handler.h
diff --git a/chrome/browser/printing/print_preview_message_handler.h b/chrome/browser/printing/print_preview_message_handler.h
index ba7102008ba757b99ccff509e0f5e00690d97321..71ca9d5bb1ee142ed3dbbfaa34cd8ab5d3018002 100644
--- a/chrome/browser/printing/print_preview_message_handler.h
+++ b/chrome/browser/printing/print_preview_message_handler.h
@@ -7,6 +7,9 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/ref_counted_memory.h"
+#include "base/memory/weak_ptr.h"
+#include "components/printing/service/public/interfaces/pdf_compositor.mojom.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -70,6 +73,27 @@ class PrintPreviewMessageHandler
void OnSetOptionsFromDocument(
const PrintHostMsg_SetOptionsFromDocument_Params& params);
+ void NotifyUIPreviewPageReady(
+ int page_number,
+ int request_id,
+ scoped_refptr<base::RefCountedBytes> data_bytes);
+ void NotifyUIPreviewDocumentReady(
+ int page_count,
+ int request_id,
+ scoped_refptr<base::RefCountedBytes> data_bytes);
+
+ // Callbacks for pdf compositor client.
+ void OnCompositePdfPageDone(int page_number,
+ int request_id,
+ mojom::PdfCompositor::Status status,
+ mojo::ScopedSharedBufferHandle handle);
+ void OnCompositePdfDocumentDone(int page_count,
+ int request_id,
+ mojom::PdfCompositor::Status status,
+ mojo::ScopedSharedBufferHandle handle);
+
+ base::WeakPtrFactory<PrintPreviewMessageHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
};
« no previous file with comments | « chrome/browser/chrome_content_browser_manifest_overlay.json ('k') | chrome/browser/printing/print_preview_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698