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