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

Side by Side Diff: chrome/common/print_messages.cc

Issue 8585017: PrintPreview: Honor the print media page size and margin values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactoring++ Created 9 years 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 #include "chrome/common/print_messages.h" 5 #include "chrome/common/print_messages.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "ui/gfx/size.h" 9 #include "ui/gfx/size.h"
10 10
11 PrintMsg_Print_Params::PrintMsg_Print_Params() 11 PrintMsg_Print_Params::PrintMsg_Print_Params()
12 : page_size(), 12 : page_size(),
13 printable_size(), 13 printable_size(),
14 margin_top(0), 14 margin_top(0),
15 margin_left(0), 15 margin_left(0),
16 dpi(0), 16 dpi(0),
17 min_shrink(0), 17 min_shrink(0),
18 max_shrink(0), 18 max_shrink(0),
19 desired_dpi(0), 19 desired_dpi(0),
20 document_cookie(0), 20 document_cookie(0),
21 selection_only(false), 21 selection_only(false),
22 supports_alpha_blend(false), 22 supports_alpha_blend(false),
23 preview_ui_addr(), 23 preview_ui_addr(),
24 preview_request_id(0), 24 preview_request_id(0),
25 is_first_request(false), 25 is_first_request(false),
26 print_to_pdf(false),
26 display_header_footer(false), 27 display_header_footer(false),
27 date(), 28 date(),
28 title(), 29 title(),
29 url() { 30 url() {
30 } 31 }
31 32
32 PrintMsg_Print_Params::~PrintMsg_Print_Params() {} 33 PrintMsg_Print_Params::~PrintMsg_Print_Params() {}
33 34
34 void PrintMsg_Print_Params::Reset() { 35 void PrintMsg_Print_Params::Reset() {
35 page_size = gfx::Size(); 36 page_size = gfx::Size();
36 printable_size = gfx::Size(); 37 printable_size = gfx::Size();
37 margin_top = 0; 38 margin_top = 0;
38 margin_left = 0; 39 margin_left = 0;
39 dpi = 0; 40 dpi = 0;
40 min_shrink = 0; 41 min_shrink = 0;
41 max_shrink = 0; 42 max_shrink = 0;
42 desired_dpi = 0; 43 desired_dpi = 0;
43 document_cookie = 0; 44 document_cookie = 0;
44 selection_only = false; 45 selection_only = false;
45 supports_alpha_blend = false; 46 supports_alpha_blend = false;
46 preview_ui_addr = std::string(); 47 preview_ui_addr = std::string();
47 preview_request_id = 0; 48 preview_request_id = 0;
48 is_first_request = false; 49 is_first_request = false;
50 print_to_pdf = false;
49 display_header_footer = false; 51 display_header_footer = false;
50 date = string16(); 52 date = string16();
51 title = string16(); 53 title = string16();
52 url = string16(); 54 url = string16();
53 } 55 }
54 56
55 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params() 57 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params()
56 : pages() { 58 : pages() {
57 } 59 }
58 60
59 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {} 61 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {}
60 62
61 void PrintMsg_PrintPages_Params::Reset() { 63 void PrintMsg_PrintPages_Params::Reset() {
62 params.Reset(); 64 params.Reset();
63 pages = std::vector<int>(); 65 pages = std::vector<int>();
64 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698