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

Side by Side Diff: printing/printing_context_cairo.h

Issue 6826027: Connect the right metafiles for print preview on Linux and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile issues and rename MetafileInterface to Metafile Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PRINTING_PRINTING_CONTEXT_CAIRO_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_CAIRO_H_
6 #define PRINTING_PRINTING_CONTEXT_CAIRO_H_ 6 #define PRINTING_PRINTING_CONTEXT_CAIRO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "printing/printing_context.h" 10 #include "printing/printing_context.h"
11 11
12 #if !defined(OS_CHROMEOS) 12 #if !defined(OS_CHROMEOS)
13 #include "printing/native_metafile.h" 13 #include "printing/metafile.h"
Lei Zhang 2011/04/11 02:51:10 forward declare?
vandebo (ex-Chrome) 2011/04/11 06:16:08 Done.
14 #endif 14 #endif
15 15
16 namespace printing { 16 namespace printing {
17 17
18 class PrintingContextCairo : public PrintingContext { 18 class PrintingContextCairo : public PrintingContext {
19 public: 19 public:
20 explicit PrintingContextCairo(const std::string& app_locale); 20 explicit PrintingContextCairo(const std::string& app_locale);
21 ~PrintingContextCairo(); 21 ~PrintingContextCairo();
22 22
23 #if !defined(OS_CHROMEOS) 23 #if !defined(OS_CHROMEOS)
24 // Sets the function that creates the print dialog, and the function that 24 // Sets the function that creates the print dialog, and the function that
25 // prints the document. 25 // prints the document.
26 static void SetPrintingFunctions( 26 static void SetPrintingFunctions(
27 void* (*create_dialog_func)(PrintSettingsCallback* callback, 27 void* (*create_dialog_func)(PrintSettingsCallback* callback,
28 PrintingContextCairo* context), 28 PrintingContextCairo* context),
29 void (*print_document_func)(void* print_dialog, 29 void (*print_document_func)(void* print_dialog,
30 const NativeMetafile* metafile, 30 const Metafile* metafile,
31 const string16& document_name)); 31 const string16& document_name));
32 32
33 // Prints the document contained in |metafile|. 33 // Prints the document contained in |metafile|.
34 void PrintDocument(const NativeMetafile* metafile); 34 void PrintDocument(const Metafile* metafile);
35 #endif 35 #endif
36 36
37 // PrintingContext implementation. 37 // PrintingContext implementation.
38 virtual void AskUserForSettings(gfx::NativeView parent_view, 38 virtual void AskUserForSettings(gfx::NativeView parent_view,
39 int max_pages, 39 int max_pages,
40 bool has_selection, 40 bool has_selection,
41 PrintSettingsCallback* callback); 41 PrintSettingsCallback* callback);
42 virtual Result UseDefaultSettings(); 42 virtual Result UseDefaultSettings();
43 virtual Result UpdatePrintSettings(const DictionaryValue& job_settings, 43 virtual Result UpdatePrintSettings(const DictionaryValue& job_settings,
44 const PageRanges& ranges); 44 const PageRanges& ranges);
(...skipping 11 matching lines...) Expand all
56 string16 document_name_; 56 string16 document_name_;
57 void* print_dialog_; 57 void* print_dialog_;
58 #endif 58 #endif
59 59
60 DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo); 60 DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo);
61 }; 61 };
62 62
63 } // namespace printing 63 } // namespace printing
64 64
65 #endif // PRINTING_PRINTING_CONTEXT_CAIRO_H_ 65 #endif // PRINTING_PRINTING_CONTEXT_CAIRO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698