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

Side by Side Diff: printing/printing_context.h

Issue 8201027: Move margin processing code to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issue that turned up on Windows Created 9 years, 2 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 | Annotate | Revision Log
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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_old.h" 11 #include "base/callback_old.h"
12 #include "base/logging.h"
Lei Zhang 2011/10/15 03:42:19 nit: not needed?
vandebo (ex-Chrome) 2011/10/15 20:52:08 Oops, this should be in the .cc
12 #include "base/string16.h" 13 #include "base/string16.h"
13 #include "printing/print_settings.h" 14 #include "printing/print_settings.h"
14 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
15 16
16 namespace base { 17 namespace base {
17 class DictionaryValue; 18 class DictionaryValue;
18 } 19 }
19 20
20 namespace printing { 21 namespace printing {
21 22
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void ReleaseContext() = 0; 92 virtual void ReleaseContext() = 0;
92 93
93 // Returns the native context used to print. 94 // Returns the native context used to print.
94 virtual gfx::NativeDrawingContext context() const = 0; 95 virtual gfx::NativeDrawingContext context() const = 0;
95 96
96 // Creates an instance of this object. Implementers of this interface should 97 // Creates an instance of this object. Implementers of this interface should
97 // implement this method to create an object of their implementation. The 98 // implement this method to create an object of their implementation. The
98 // caller owns the returned object. 99 // caller owns the returned object.
99 static PrintingContext* Create(const std::string& app_locale); 100 static PrintingContext* Create(const std::string& app_locale);
100 101
101 void set_use_overlays(bool use_overlays) { 102 void set_margin_type(MarginType type);
102 settings_.use_overlays = use_overlays;
103 }
104 103
105 const PrintSettings& settings() const { 104 const PrintSettings& settings() const {
106 return settings_; 105 return settings_;
107 } 106 }
108 107
109 protected: 108 protected:
110 explicit PrintingContext(const std::string& app_locale); 109 explicit PrintingContext(const std::string& app_locale);
111 110
112 // Reinitializes the settings for object reuse. 111 // Reinitializes the settings for object reuse.
113 void ResetSettings(); 112 void ResetSettings();
(...skipping 15 matching lines...) Expand all
129 128
130 // The application locale. 129 // The application locale.
131 std::string app_locale_; 130 std::string app_locale_;
132 131
133 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 132 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
134 }; 133 };
135 134
136 } // namespace printing 135 } // namespace printing
137 136
138 #endif // PRINTING_PRINTING_CONTEXT_H_ 137 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698