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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted_memory.h"
11 #include "base/memory/weak_ptr.h"
12 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h"
10 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
12 15
13 class PrintPreviewUI; 16 class PrintPreviewUI;
14 struct PrintHostMsg_DidGetPreviewPageCount_Params; 17 struct PrintHostMsg_DidGetPreviewPageCount_Params;
15 struct PrintHostMsg_DidPreviewDocument_Params; 18 struct PrintHostMsg_DidPreviewDocument_Params;
16 struct PrintHostMsg_DidPreviewPage_Params; 19 struct PrintHostMsg_DidPreviewPage_Params;
17 struct PrintHostMsg_RequestPrintPreview_Params; 20 struct PrintHostMsg_RequestPrintPreview_Params;
18 struct PrintHostMsg_SetOptionsFromDocument_Params; 21 struct PrintHostMsg_SetOptionsFromDocument_Params;
19 22
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const PrintHostMsg_DidGetPreviewPageCount_Params& params); 66 const PrintHostMsg_DidGetPreviewPageCount_Params& params);
64 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); 67 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params);
65 void OnMetafileReadyForPrinting( 68 void OnMetafileReadyForPrinting(
66 const PrintHostMsg_DidPreviewDocument_Params& params); 69 const PrintHostMsg_DidPreviewDocument_Params& params);
67 void OnPrintPreviewFailed(int document_cookie); 70 void OnPrintPreviewFailed(int document_cookie);
68 void OnPrintPreviewCancelled(int document_cookie); 71 void OnPrintPreviewCancelled(int document_cookie);
69 void OnInvalidPrinterSettings(int document_cookie); 72 void OnInvalidPrinterSettings(int document_cookie);
70 void OnSetOptionsFromDocument( 73 void OnSetOptionsFromDocument(
71 const PrintHostMsg_SetOptionsFromDocument_Params& params); 74 const PrintHostMsg_SetOptionsFromDocument_Params& params);
72 75
76 void NotifyUIPreviewPageReady(
77 int page_number,
78 int request_id,
79 scoped_refptr<base::RefCountedBytes> data_bytes);
80 void NotifyUIPreviewDocumentReady(
81 int page_count,
82 int request_id,
83 scoped_refptr<base::RefCountedBytes> data_bytes);
84
85 // Callbacks for pdf compositor client.
86 void OnCompositePdfPageDone(int page_number,
87 int request_id,
88 mojom::PdfCompositor::Status status,
89 mojo::ScopedSharedBufferHandle handle);
90 void OnCompositePdfDocumentDone(int page_count,
91 int request_id,
92 mojom::PdfCompositor::Status status,
93 mojo::ScopedSharedBufferHandle handle);
94
95 base::WeakPtrFactory<PrintPreviewMessageHandler> weak_ptr_factory_;
96
73 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); 97 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
74 }; 98 };
75 99
76 } // namespace printing 100 } // namespace printing
77 101
78 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ 102 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
OLDNEW
« 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