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

Side by Side Diff: printing/printing_context_gtk.h

Issue 8372030: Get printing working in Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More gyp fixes Created 9 years, 1 month 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
« no previous file with comments | « printing/printing_context_cairo.cc ('k') | printing/printing_context_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GTK_H_
6 #define PRINTING_PRINTING_CONTEXT_CAIRO_H_ 6 #define PRINTING_PRINTING_CONTEXT_GTK_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 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 } 14 }
15 15
16 namespace printing { 16 namespace printing {
17 17
18 class Metafile; 18 class Metafile;
19 class PrintDialogGtkInterface; 19 class PrintDialogGtkInterface;
20 20
21 class PRINTING_EXPORT PrintingContextCairo : public PrintingContext { 21 class PRINTING_EXPORT PrintingContextGtk : public PrintingContext {
22 public: 22 public:
23 explicit PrintingContextCairo(const std::string& app_locale); 23 explicit PrintingContextGtk(const std::string& app_locale);
24 virtual ~PrintingContextCairo(); 24 virtual ~PrintingContextGtk();
25 25
26 #if !defined(OS_CHROMEOS)
27 // Sets the function that creates the print dialog. 26 // Sets the function that creates the print dialog.
28 static void SetCreatePrintDialogFunction( 27 static void SetCreatePrintDialogFunction(
29 PrintDialogGtkInterface* (*create_dialog_func)( 28 PrintDialogGtkInterface* (*create_dialog_func)(
30 PrintingContextCairo* context)); 29 PrintingContextGtk* context));
31 30
32 // Prints the document contained in |metafile|. 31 // Prints the document contained in |metafile|.
33 void PrintDocument(const Metafile* metafile); 32 void PrintDocument(const Metafile* metafile);
34 #endif
35 33
36 // PrintingContext implementation. 34 // PrintingContext implementation.
37 virtual void AskUserForSettings(gfx::NativeView parent_view, 35 virtual void AskUserForSettings(gfx::NativeView parent_view,
38 int max_pages, 36 int max_pages,
39 bool has_selection, 37 bool has_selection,
40 PrintSettingsCallback* callback); 38 PrintSettingsCallback* callback);
41 virtual Result UseDefaultSettings(); 39 virtual Result UseDefaultSettings();
42 virtual Result UpdatePrinterSettings( 40 virtual Result UpdatePrinterSettings(
43 const base::DictionaryValue& job_settings, 41 const base::DictionaryValue& job_settings,
44 const PageRanges& ranges); 42 const PageRanges& ranges);
45 virtual Result InitWithSettings(const PrintSettings& settings); 43 virtual Result InitWithSettings(const PrintSettings& settings);
46 virtual Result NewDocument(const string16& document_name); 44 virtual Result NewDocument(const string16& document_name);
47 virtual Result NewPage(); 45 virtual Result NewPage();
48 virtual Result PageDone(); 46 virtual Result PageDone();
49 virtual Result DocumentDone(); 47 virtual Result DocumentDone();
50 virtual void Cancel(); 48 virtual void Cancel();
51 virtual void ReleaseContext(); 49 virtual void ReleaseContext();
52 virtual gfx::NativeDrawingContext context() const; 50 virtual gfx::NativeDrawingContext context() const;
53 51
54 private: 52 private:
55 #if !defined(OS_CHROMEOS)
56 string16 document_name_; 53 string16 document_name_;
57 PrintDialogGtkInterface* print_dialog_; 54 PrintDialogGtkInterface* print_dialog_;
58 #endif
59 55
60 DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo); 56 DISALLOW_COPY_AND_ASSIGN(PrintingContextGtk);
61 }; 57 };
62 58
63 } // namespace printing 59 } // namespace printing
64 60
65 #endif // PRINTING_PRINTING_CONTEXT_CAIRO_H_ 61 #endif // PRINTING_PRINTING_CONTEXT_GTK_H_
62
OLDNEW
« no previous file with comments | « printing/printing_context_cairo.cc ('k') | printing/printing_context_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698