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

Side by Side Diff: printing/print_settings.h

Issue 1397333003: PDF Printing: embed browser user agent string in PDF metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-05 (Thursday) 15:50:39 EST Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PRINT_SETTINGS_H_ 5 #ifndef PRINTING_PRINT_SETTINGS_H_
6 #define PRINTING_PRINT_SETTINGS_H_ 6 #define PRINTING_PRINT_SETTINGS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "printing/page_range.h" 11 #include "printing/page_range.h"
12 #include "printing/page_setup.h" 12 #include "printing/page_setup.h"
13 #include "printing/print_job_constants.h" 13 #include "printing/print_job_constants.h"
14 #include "printing/printing_export.h" 14 #include "printing/printing_export.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 16
17 namespace printing { 17 namespace printing {
18 18
19 // Returns true if |color_mode| is color and not B&W. 19 // Returns true if |color_mode| is color and not B&W.
20 PRINTING_EXPORT bool IsColorModelSelected(int color_mode); 20 PRINTING_EXPORT bool IsColorModelSelected(int color_mode);
21 21
22 #if defined(USE_CUPS) 22 #if defined(USE_CUPS)
23 // Get the color model setting name and value for the |color_mode|. 23 // Get the color model setting name and value for the |color_mode|.
24 PRINTING_EXPORT void GetColorModelForMode(int color_mode, 24 PRINTING_EXPORT void GetColorModelForMode(int color_mode,
25 std::string* color_setting_name, 25 std::string* color_setting_name,
26 std::string* color_value); 26 std::string* color_value);
27 #endif 27 #endif
28 28
29 // Inform the printing system that it may embed this user-agent string
30 // in its output's metadata.
31 PRINTING_EXPORT void SetAgent(const std::string&);
Lei Zhang 2015/11/05 21:37:23 include the parameter name
hal.canary 2015/11/05 22:16:48 done
32 PRINTING_EXPORT const std::string& GetAgent();
33
29 // OS-independent print settings. 34 // OS-independent print settings.
30 class PRINTING_EXPORT PrintSettings { 35 class PRINTING_EXPORT PrintSettings {
31 public: 36 public:
32 // Media properties requested by the user. Default instance represents 37 // Media properties requested by the user. Default instance represents
33 // default media selection. 38 // default media selection.
34 struct RequestedMedia { 39 struct RequestedMedia {
35 // Size of the media, in microns. 40 // Size of the media, in microns.
36 gfx::Size size_microns; 41 gfx::Size size_microns;
37 // Platform specific id to map it back to the particular media. 42 // Platform specific id to map it back to the particular media.
38 std::string vendor_id; 43 std::string vendor_id;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // True if this printer supports AlphaBlend. 220 // True if this printer supports AlphaBlend.
216 bool supports_alpha_blend_; 221 bool supports_alpha_blend_;
217 222
218 // If margin type is custom, this is what was requested. 223 // If margin type is custom, this is what was requested.
219 PageMargins requested_custom_margins_in_points_; 224 PageMargins requested_custom_margins_in_points_;
220 }; 225 };
221 226
222 } // namespace printing 227 } // namespace printing
223 228
224 #endif // PRINTING_PRINT_SETTINGS_H_ 229 #endif // PRINTING_PRINT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698