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 3 // found in the LICENSE file. 4 5 #include "android_webview/common/print_messages.h" 6 7 #include "base/basictypes.h" 8 #include "base/strings/string16.h" 9 #include "ui/gfx/size.h" 10 11 PrintMsg_Print_Params::PrintMsg_Print_Params() 12 : page_size(), 13 content_size(), 14 printable_area(), 15 margin_top(0), 16 margin_left(0), 17 dpi(0), 18 min_shrink(0), 19 max_shrink(0), 20 desired_dpi(0), 21 document_cookie(0), 22 selection_only(false), 23 supports_alpha_blend(false), 24 preview_ui_id(-1), 25 preview_request_id(0), 26 is_first_request(false), 27 print_scaling_option(WebKit::WebPrintScalingOptionSourceSize), 28 print_to_pdf(false), 29 display_header_footer(false), 30 date(), 31 title(), 32 url(), 33 should_print_backgrounds(false) { 34 } 35 36 PrintMsg_Print_Params::~PrintMsg_Print_Params() {} 37 38 void PrintMsg_Print_Params::Reset() { 39 page_size = gfx::Size(); 40 content_size = gfx::Size(); 41 printable_area = gfx::Rect(); 42 margin_top = 0; 43 margin_left = 0; 44 dpi = 0; 45 min_shrink = 0; 46 max_shrink = 0; 47 desired_dpi = 0; 48 document_cookie = 0; 49 selection_only = false; 50 supports_alpha_blend = false; 51 preview_ui_id = -1; 52 preview_request_id = 0; 53 is_first_request = false; 54 print_scaling_option = WebKit::WebPrintScalingOptionSourceSize; 55 print_to_pdf = false; 56 display_header_footer = false; 57 date = string16(); 58 title = string16(); 59 url = string16(); 60 should_print_backgrounds = false; 61 } 62 63 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params() 64 : pages() { 65 } 66 67 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {} 68 69 void PrintMsg_PrintPages_Params::Reset() { 70 params.Reset(); 71 pages = std::vector<int>(); 72 } 73 74 PrintHostMsg_RequestPrintPreview_Params:: 75 PrintHostMsg_RequestPrintPreview_Params() 76 : is_modifiable(false), 77 webnode_only(false), 78 has_selection(false), 79 selection_only(false) { 80 } 81 82 PrintHostMsg_RequestPrintPreview_Params:: 83 ~PrintHostMsg_RequestPrintPreview_Params() {} 84