Teach create_nmf.py about new toolchains' BFD format names
[chromium-blink-merge.git] / printing / printing_context_gtk.h
blob8476bfb30a59631a693c0d4bb70e62bdb8aa3fa3
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
3 // found in the LICENSE file.
5 #ifndef PRINTING_PRINTING_CONTEXT_GTK_H_
6 #define PRINTING_PRINTING_CONTEXT_GTK_H_
8 #include <string>
10 #include "printing/printing_context.h"
12 namespace base {
13 class DictionaryValue;
16 namespace printing {
18 class Metafile;
19 class PrintDialogGtkInterface;
21 class PRINTING_EXPORT PrintingContextGtk : public PrintingContext {
22 public:
23 explicit PrintingContextGtk(const std::string& app_locale);
24 virtual ~PrintingContextGtk();
26 // Sets the function that creates the print dialog.
27 static void SetCreatePrintDialogFunction(
28 PrintDialogGtkInterface* (*create_dialog_func)(
29 PrintingContextGtk* context));
31 // Prints the document contained in |metafile|.
32 void PrintDocument(const Metafile* metafile);
34 // PrintingContext implementation.
35 virtual void AskUserForSettings(
36 gfx::NativeView parent_view,
37 int max_pages,
38 bool has_selection,
39 const PrintSettingsCallback& callback) OVERRIDE;
40 virtual gfx::Size GetPdfPaperSizeDeviceUnits() OVERRIDE;
41 virtual Result UseDefaultSettings() OVERRIDE;
42 virtual Result UpdatePrinterSettings(bool external_preview) OVERRIDE;
43 virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE;
44 virtual Result NewDocument(const base::string16& document_name) OVERRIDE;
45 virtual Result NewPage() OVERRIDE;
46 virtual Result PageDone() OVERRIDE;
47 virtual Result DocumentDone() OVERRIDE;
48 virtual void Cancel() OVERRIDE;
49 virtual void ReleaseContext() OVERRIDE;
50 virtual gfx::NativeDrawingContext context() const OVERRIDE;
52 private:
53 base::string16 document_name_;
54 PrintDialogGtkInterface* print_dialog_;
56 DISALLOW_COPY_AND_ASSIGN(PrintingContextGtk);
59 } // namespace printing
61 #endif // PRINTING_PRINTING_CONTEXT_GTK_H_