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

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

Issue 255543006: Printing on Windows via PDF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: start looking at service process Created 6 years, 8 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_view_manager_base.h
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index bd627a2706b7ab7618b9d703f5a2654fc1dfb5c6..94a7c750b46c1b25ac2e3114650b828ef5fb4c6d 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -8,10 +8,12 @@
#include "base/memory/ref_counted.h"
#include "base/prefs/pref_member.h"
#include "base/strings/string16.h"
+#include "chrome/service/service_utility_process_host.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#include "printing/metafile_impl.h"
#include "printing/printed_pages_source.h"
struct PrintHostMsg_DidPrintPage_Params;
@@ -30,7 +32,11 @@ class PrintQueriesQueue;
// Base class for managing the print commands for a WebContents.
class PrintViewManagerBase : public content::NotificationObserver,
public PrintedPagesSource,
- public content::WebContentsObserver {
+ public content::WebContentsObserver
+#if 0 && defined(OS_WIN) && !PRINTING_USE_EMF_METAFILE
+ , public ServiceUtilityProcessHost::Client
+#endif
+ {
public:
virtual ~PrintViewManagerBase();
@@ -45,6 +51,14 @@ class PrintViewManagerBase : public content::NotificationObserver,
// PrintedPagesSource implementation.
virtual base::string16 RenderSourceName() OVERRIDE;
+#if 0 && defined(OS_WIN) && !PRINTING_USE_EMF_METAFILE
+ // ServiceUtilityProcessHost::Client implementation:
+ virtual void OnRenderPDFPagesToMetafileSucceeded(
+ const printing::Emf& metafile,
+ int highest_rendered_page_number,
+ double scale_factor) OVERRIDE;
+#endif
+
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);
@@ -130,6 +144,11 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Release the PrinterQuery associated with our |cookie_|.
void ReleasePrinterQuery();
+#if 0 && defined(OS_WIN) && !PRINTING_USE_EMF_METAFILE
+ // XXX
+ void ConvertPDFToEMF(scoped_ptr<NativeMetafile> metafile);
+#endif
+
content::NotificationRegistrar registrar_;
// Manages the low-level talk to the printer.
@@ -146,7 +165,8 @@ class PrintViewManagerBase : public content::NotificationObserver,
// print settings are being loaded.
bool inside_inner_message_loop_;
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if (defined(OS_POSIX) && !defined(OS_MACOSX)) || \
+ (defined(OS_WIN) && !PRINTING_USE_EMF_METAFILE)
// Set to true when OnDidPrintPage() should be expecting the first page.
bool expecting_first_page_;
#endif
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager_base.cc » ('j') | chrome/browser/printing/print_view_manager_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698