Chromium Code Reviews| 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_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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // document. | 104 // document. |
| 105 virtual Result DocumentDone() = 0; | 105 virtual Result DocumentDone() = 0; |
| 106 | 106 |
| 107 // Cancels printing. Can be used in a multi-threaded context. Takes effect | 107 // Cancels printing. Can be used in a multi-threaded context. Takes effect |
| 108 // immediately. | 108 // immediately. |
| 109 virtual void Cancel() = 0; | 109 virtual void Cancel() = 0; |
| 110 | 110 |
| 111 // Releases the native printing context. | 111 // Releases the native printing context. |
| 112 virtual void ReleaseContext() = 0; | 112 virtual void ReleaseContext() = 0; |
| 113 | 113 |
| 114 // Sets postscript printing enabled | |
|
Lei Zhang
2017/02/25 03:03:35
"Sets if the postscript printing feature is enable
| |
| 115 virtual void SetPostScriptEnabled(bool is_enabled) = 0; | |
|
Lei Zhang
2017/02/25 03:03:35
Maybe we should just ifdef this so we don't need d
| |
| 116 | |
| 114 // Returns the native context used to print. | 117 // Returns the native context used to print. |
| 115 virtual skia::NativeDrawingContext context() const = 0; | 118 virtual skia::NativeDrawingContext context() const = 0; |
| 116 | 119 |
| 117 // Creates an instance of this object. Implementers of this interface should | 120 // Creates an instance of this object. Implementers of this interface should |
| 118 // implement this method to create an object of their implementation. | 121 // implement this method to create an object of their implementation. |
| 119 static std::unique_ptr<PrintingContext> Create(Delegate* delegate); | 122 static std::unique_ptr<PrintingContext> Create(Delegate* delegate); |
| 120 | 123 |
| 121 void set_margin_type(MarginType type); | 124 void set_margin_type(MarginType type); |
| 122 void set_is_modifiable(bool is_modifiable); | 125 void set_is_modifiable(bool is_modifiable); |
| 123 | 126 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 151 // The job id for the current job. The value is 0 if no jobs are active. | 154 // The job id for the current job. The value is 0 if no jobs are active. |
| 152 int job_id_; | 155 int job_id_; |
| 153 | 156 |
| 154 private: | 157 private: |
| 155 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 158 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace printing | 161 } // namespace printing |
| 159 | 162 |
| 160 #endif // PRINTING_PRINTING_CONTEXT_H_ | 163 #endif // PRINTING_PRINTING_CONTEXT_H_ |
| OLD | NEW |