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

Unified Diff: printing/printing_context_cairo.h

Issue 6516022: Linux: Refactor printing to be more like Windows/Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac build Created 9 years, 10 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: printing/printing_context_cairo.h
===================================================================
--- printing/printing_context_cairo.h (revision 75320)
+++ printing/printing_context_cairo.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,10 @@
#include "printing/printing_context.h"
+#if !defined(OS_CHROMEOS)
+#include "printing/native_metafile.h"
+#endif
+
namespace printing {
class PrintingContextCairo : public PrintingContext {
@@ -16,6 +20,20 @@
explicit PrintingContextCairo(const std::string& app_locale);
~PrintingContextCairo();
+#if !defined(OS_CHROMEOS)
+ // Sets the function that creates the print dialog, and the function that
+ // prints the document.
+ static void SetPrintingFunctions(
+ void* (*create_dialog_func)(PrintSettingsCallback* callback,
+ PrintingContextCairo* context),
+ void (*print_document_func)(void* print_dialog,
+ const NativeMetafile* metafile,
+ const string16& document_name));
+
+ // Prints the document contained in |metafile|.
+ void PrintDocument(const NativeMetafile* metafile);
+#endif
+
// PrintingContext implementation.
virtual void AskUserForSettings(gfx::NativeView parent_view,
int max_pages,
@@ -32,6 +50,11 @@
virtual gfx::NativeDrawingContext context() const;
private:
+#if !defined(OS_CHROMEOS)
+ string16 document_name_;
+ void* print_dialog_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo);
};

Powered by Google App Engine
This is Rietveld 408576698