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

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, 4 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..bcb90ed7dc76c62e076426af46f6a44cc98ee4a5 100644
--- a/chrome/browser/printing/print_preview_message_handler.h
+++ b/chrome/browser/printing/print_preview_message_handler.h
@@ -7,6 +7,8 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/ref_counted_memory.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"
@@ -41,6 +43,16 @@ class PrintPreviewMessageHandler
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* render_frame_host) override;
+ void OnCompositePdfPageDone(int page_number,
Lei Zhang 2017/08/28 23:01:12 I think these can be private.
Wei Li 2017/08/30 00:24:02 Done.
+ 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);
+
private:
explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
friend class content::WebContentsUserData<PrintPreviewMessageHandler>;
@@ -70,6 +82,15 @@ 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);
+
DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
};

Powered by Google App Engine
This is Rietveld 408576698