OLD | NEW |
1 // Copyright (c) 2010 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 namespace printing { | 12 namespace printing { |
13 | 13 |
14 class PrintingContextCairo : public PrintingContext { | 14 class PrintingContextCairo : public PrintingContext { |
15 public: | 15 public: |
16 explicit PrintingContextCairo(const std::string& app_locale); | 16 explicit PrintingContextCairo(const std::string& app_locale); |
17 ~PrintingContextCairo(); | 17 ~PrintingContextCairo(); |
18 | 18 |
19 // PrintingContext implementation. | 19 // PrintingContext implementation. |
20 virtual void AskUserForSettings(gfx::NativeView parent_view, | 20 virtual void AskUserForSettings(gfx::NativeView parent_view, |
21 int max_pages, | 21 int max_pages, |
22 bool has_selection, | 22 bool has_selection, |
23 PrintSettingsCallback* callback); | 23 PrintSettingsCallback* callback); |
24 virtual Result UseDefaultSettings(); | 24 virtual Result UseDefaultSettings(); |
| 25 virtual Result UpdatePrintSettings(const DictionaryValue* job_settings, |
| 26 const PageRanges& ranges); |
25 virtual Result InitWithSettings(const PrintSettings& settings); | 27 virtual Result InitWithSettings(const PrintSettings& settings); |
26 virtual Result NewDocument(const string16& document_name); | 28 virtual Result NewDocument(const string16& document_name); |
27 virtual Result NewPage(); | 29 virtual Result NewPage(); |
28 virtual Result PageDone(); | 30 virtual Result PageDone(); |
29 virtual Result DocumentDone(); | 31 virtual Result DocumentDone(); |
30 virtual void Cancel(); | 32 virtual void Cancel(); |
31 virtual void ReleaseContext(); | 33 virtual void ReleaseContext(); |
32 virtual gfx::NativeDrawingContext context() const; | 34 virtual gfx::NativeDrawingContext context() const; |
33 | 35 |
34 private: | 36 private: |
35 DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo); | 37 DISALLOW_COPY_AND_ASSIGN(PrintingContextCairo); |
36 }; | 38 }; |
37 | 39 |
38 } // namespace printing | 40 } // namespace printing |
39 | 41 |
40 #endif // PRINTING_PRINTING_CONTEXT_CAIRO_H_ | 42 #endif // PRINTING_PRINTING_CONTEXT_CAIRO_H_ |
OLD | NEW |