| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void ReleaseContext() = 0; | 91 virtual void ReleaseContext() = 0; |
| 92 | 92 |
| 93 // Returns the native context used to print. | 93 // Returns the native context used to print. |
| 94 virtual gfx::NativeDrawingContext context() const = 0; | 94 virtual gfx::NativeDrawingContext context() const = 0; |
| 95 | 95 |
| 96 // Creates an instance of this object. Implementers of this interface should | 96 // Creates an instance of this object. Implementers of this interface should |
| 97 // implement this method to create an object of their implementation. The | 97 // implement this method to create an object of their implementation. The |
| 98 // caller owns the returned object. | 98 // caller owns the returned object. |
| 99 static PrintingContext* Create(const std::string& app_locale); | 99 static PrintingContext* Create(const std::string& app_locale); |
| 100 | 100 |
| 101 void set_use_overlays(bool use_overlays) { | 101 void set_margin_type(MarginType type); |
| 102 settings_.use_overlays = use_overlays; | |
| 103 } | |
| 104 | 102 |
| 105 const PrintSettings& settings() const { | 103 const PrintSettings& settings() const { |
| 106 return settings_; | 104 return settings_; |
| 107 } | 105 } |
| 108 | 106 |
| 109 protected: | 107 protected: |
| 110 explicit PrintingContext(const std::string& app_locale); | 108 explicit PrintingContext(const std::string& app_locale); |
| 111 | 109 |
| 112 // Reinitializes the settings for object reuse. | 110 // Reinitializes the settings for object reuse. |
| 113 void ResetSettings(); | 111 void ResetSettings(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 129 | 127 |
| 130 // The application locale. | 128 // The application locale. |
| 131 std::string app_locale_; | 129 std::string app_locale_; |
| 132 | 130 |
| 133 DISALLOW_COPY_AND_ASSIGN(PrintingContext); | 131 DISALLOW_COPY_AND_ASSIGN(PrintingContext); |
| 134 }; | 132 }; |
| 135 | 133 |
| 136 } // namespace printing | 134 } // namespace printing |
| 137 | 135 |
| 138 #endif // PRINTING_PRINTING_CONTEXT_H_ | 136 #endif // PRINTING_PRINTING_CONTEXT_H_ |
| OLD | NEW |