OLD | NEW |
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_MAC_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_MAC_H_ |
6 #define PRINTING_PRINTING_CONTEXT_MAC_H_ | 6 #define PRINTING_PRINTING_CONTEXT_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class PRINTING_EXPORT PrintingContextMac : public PrintingContext { | 22 class PRINTING_EXPORT PrintingContextMac : public PrintingContext { |
23 public: | 23 public: |
24 explicit PrintingContextMac(const std::string& app_locale); | 24 explicit PrintingContextMac(const std::string& app_locale); |
25 virtual ~PrintingContextMac(); | 25 virtual ~PrintingContextMac(); |
26 | 26 |
27 // PrintingContext implementation. | 27 // PrintingContext implementation. |
28 virtual void AskUserForSettings(gfx::NativeView parent_view, | 28 virtual void AskUserForSettings(gfx::NativeView parent_view, |
29 int max_pages, | 29 int max_pages, |
30 bool has_selection, | 30 bool has_selection, |
31 PrintSettingsCallback* callback); | 31 PrintSettingsCallback* callback) OVERRIDE; |
32 virtual Result UseDefaultSettings(); | 32 virtual Result UseDefaultSettings() OVERRIDE; |
33 virtual Result UpdatePrinterSettings( | 33 virtual Result UpdatePrinterSettings( |
34 const base::DictionaryValue& job_settings, | 34 const base::DictionaryValue& job_settings, |
35 const PageRanges& ranges); | 35 const PageRanges& ranges) OVERRIDE; |
36 virtual Result InitWithSettings(const PrintSettings& settings); | 36 virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE; |
37 virtual Result NewDocument(const string16& document_name); | 37 virtual Result NewDocument(const string16& document_name) OVERRIDE; |
38 virtual Result NewPage(); | 38 virtual Result NewPage() OVERRIDE; |
39 virtual Result PageDone(); | 39 virtual Result PageDone() OVERRIDE; |
40 virtual Result DocumentDone(); | 40 virtual Result DocumentDone() OVERRIDE; |
41 virtual void Cancel(); | 41 virtual void Cancel() OVERRIDE; |
42 virtual void ReleaseContext(); | 42 virtual void ReleaseContext() OVERRIDE; |
43 virtual gfx::NativeDrawingContext context() const; | 43 virtual gfx::NativeDrawingContext context() const OVERRIDE; |
44 | 44 |
45 private: | 45 private: |
46 // Initializes PrintSettings from |print_info_|. This must be called | 46 // Initializes PrintSettings from |print_info_|. This must be called |
47 // after changes to |print_info_| in order for the changes to take effect in | 47 // after changes to |print_info_| in order for the changes to take effect in |
48 // printing. | 48 // printing. |
49 // This function ignores the page range information specified in the print | 49 // This function ignores the page range information specified in the print |
50 // info object and use |ranges| instead. | 50 // info object and use |ranges| instead. |
51 void InitPrintSettingsFromPrintInfo(const PageRanges& ranges); | 51 void InitPrintSettingsFromPrintInfo(const PageRanges& ranges); |
52 | 52 |
53 // Returns the set of page ranges constructed from |print_info_|. | 53 // Returns the set of page ranges constructed from |print_info_|. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // The current page's context; only valid between NewPage and PageDone call | 87 // The current page's context; only valid between NewPage and PageDone call |
88 // pairs. | 88 // pairs. |
89 CGContext* context_; | 89 CGContext* context_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); | 91 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace printing | 94 } // namespace printing |
95 | 95 |
96 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ | 96 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ |
OLD | NEW |