| 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_WIN_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_WIN_H_ |
| 6 #define PRINTING_PRINTING_CONTEXT_WIN_H_ | 6 #define PRINTING_PRINTING_CONTEXT_WIN_H_ |
| 7 | 7 |
| 8 #include <ocidl.h> | 8 #include <ocidl.h> |
| 9 #include <commdlg.h> | 9 #include <commdlg.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "printing/printing_context.h" | 15 #include "printing/printing_context.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 namespace printing { | 18 namespace printing { |
| 19 | 19 |
| 20 class PrintingContextWin : public PrintingContext { | 20 class PrintingContextWin : public PrintingContext { |
| 21 public: | 21 public: |
| 22 explicit PrintingContextWin(const std::string& app_locale); | 22 explicit PrintingContextWin(const std::string& app_locale); |
| 23 ~PrintingContextWin(); | 23 ~PrintingContextWin(); |
| 24 | 24 |
| 25 // PrintingContext implementation. | 25 // PrintingContext implementation. |
| 26 virtual void AskUserForSettings(gfx::NativeView parent_view, | 26 virtual void AskUserForSettings(gfx::NativeView parent_view, |
| 27 int max_pages, | 27 int max_pages, |
| 28 bool has_selection, | 28 bool has_selection, |
| 29 PrintSettingsCallback* callback); | 29 PrintSettingsCallback* callback); |
| 30 virtual Result UseDefaultSettings(); | 30 virtual Result UseDefaultSettings(); |
| 31 virtual Result UpdatePrintSettings(const PageRanges& ranges); |
| 31 virtual Result InitWithSettings(const PrintSettings& settings); | 32 virtual Result InitWithSettings(const PrintSettings& settings); |
| 32 virtual Result NewDocument(const string16& document_name); | 33 virtual Result NewDocument(const string16& document_name); |
| 33 virtual Result NewPage(); | 34 virtual Result NewPage(); |
| 34 virtual Result PageDone(); | 35 virtual Result PageDone(); |
| 35 virtual Result DocumentDone(); | 36 virtual Result DocumentDone(); |
| 36 virtual void Cancel(); | 37 virtual void Cancel(); |
| 37 virtual void ReleaseContext(); | 38 virtual void ReleaseContext(); |
| 38 virtual gfx::NativeDrawingContext context() const; | 39 virtual gfx::NativeDrawingContext context() const; |
| 39 | 40 |
| 40 #if defined(UNIT_TEST) | 41 #if defined(UNIT_TEST) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Function pointer that defaults to PrintDlgEx. It can be changed using | 88 // Function pointer that defaults to PrintDlgEx. It can be changed using |
| 88 // SetPrintDialog() in tests. | 89 // SetPrintDialog() in tests. |
| 89 HRESULT (__stdcall *print_dialog_func_)(LPPRINTDLGEX); | 90 HRESULT (__stdcall *print_dialog_func_)(LPPRINTDLGEX); |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); | 92 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace printing | 95 } // namespace printing |
| 95 | 96 |
| 96 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_ | 97 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_ |
| OLD | NEW |