Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: printing/printing_context.h

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again, resolve conflicts Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « printing/print_settings_conversion.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_H_
6 #define PRINTING_PRINTING_CONTEXT_H_ 6 #define PRINTING_PRINTING_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 // An abstraction of a printer context, implemented by objects that describe the 23 // An abstraction of a printer context, implemented by objects that describe the
24 // user selected printing context. This includes the OS-dependent UI to ask the 24 // user selected printing context. This includes the OS-dependent UI to ask the
25 // user about the print settings. Concrete implementations directly talk to the 25 // user about the print settings. Concrete implementations directly talk to the
26 // printer and manage the document and page breaks. 26 // printer and manage the document and page breaks.
27 class PRINTING_EXPORT PrintingContext { 27 class PRINTING_EXPORT PrintingContext {
28 public: 28 public:
29 // Printing context delegate. 29 // Printing context delegate.
30 class Delegate { 30 class Delegate {
31 public: 31 public:
32 Delegate() {}; 32 Delegate() {}
33 virtual ~Delegate() {}; 33 virtual ~Delegate() {}
34 34
35 // Returns parent view to use for modal dialogs. 35 // Returns parent view to use for modal dialogs.
36 virtual gfx::NativeView GetParentView() = 0; 36 virtual gfx::NativeView GetParentView() = 0;
37 37
38 // Returns application locale. 38 // Returns application locale.
39 virtual std::string GetAppLocale() = 0; 39 virtual std::string GetAppLocale() = 0;
40 }; 40 };
41 41
42 // Tri-state result for user behavior-dependent functions. 42 // Tri-state result for user behavior-dependent functions.
43 enum Result { 43 enum Result {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual void ReleaseContext() = 0; 114 virtual void ReleaseContext() = 0;
115 115
116 // Returns the native context used to print. 116 // Returns the native context used to print.
117 virtual gfx::NativeDrawingContext context() const = 0; 117 virtual gfx::NativeDrawingContext context() const = 0;
118 118
119 // Creates an instance of this object. Implementers of this interface should 119 // Creates an instance of this object. Implementers of this interface should
120 // implement this method to create an object of their implementation. 120 // implement this method to create an object of their implementation.
121 static std::unique_ptr<PrintingContext> Create(Delegate* delegate); 121 static std::unique_ptr<PrintingContext> Create(Delegate* delegate);
122 122
123 void set_margin_type(MarginType type); 123 void set_margin_type(MarginType type);
124 void set_is_modifiable(bool is_modifiable);
124 125
125 const PrintSettings& settings() const { 126 const PrintSettings& settings() const {
126 return settings_; 127 return settings_;
127 } 128 }
128 129
129 protected: 130 protected:
130 explicit PrintingContext(Delegate* delegate); 131 explicit PrintingContext(Delegate* delegate);
131 132
132 // Reinitializes the settings for object reuse. 133 // Reinitializes the settings for object reuse.
133 void ResetSettings(); 134 void ResetSettings();
(...skipping 13 matching lines...) Expand all
147 // Did the user cancel the print job. 148 // Did the user cancel the print job.
148 volatile bool abort_printing_; 149 volatile bool abort_printing_;
149 150
150 private: 151 private:
151 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 152 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
152 }; 153 };
153 154
154 } // namespace printing 155 } // namespace printing
155 156
156 #endif // PRINTING_PRINTING_CONTEXT_H_ 157 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW
« no previous file with comments | « printing/print_settings_conversion.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698