OLD | NEW |
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 #include "chrome/renderer/mock_printer.h" | 5 #include "chrome/renderer/mock_printer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 selection_only_(false), | 63 selection_only_(false), |
64 should_print_backgrounds_(false), | 64 should_print_backgrounds_(false), |
65 document_cookie_(-1), | 65 document_cookie_(-1), |
66 current_document_cookie_(0), | 66 current_document_cookie_(0), |
67 printer_status_(PRINTER_READY), | 67 printer_status_(PRINTER_READY), |
68 number_pages_(0), | 68 number_pages_(0), |
69 page_number_(0), | 69 page_number_(0), |
70 is_first_request_(true), | 70 is_first_request_(true), |
71 print_to_pdf_(false), | 71 print_to_pdf_(false), |
72 preview_request_id_(0), | 72 preview_request_id_(0), |
73 print_scaling_option_(WebKit::WebPrintScalingOptionSourceSize), | 73 print_scaling_option_(blink::WebPrintScalingOptionSourceSize), |
74 display_header_footer_(false), | 74 display_header_footer_(false), |
75 title_(ASCIIToUTF16("title")), | 75 title_(ASCIIToUTF16("title")), |
76 url_(ASCIIToUTF16("url")), | 76 url_(ASCIIToUTF16("url")), |
77 use_invalid_settings_(false) { | 77 use_invalid_settings_(false) { |
78 page_size_.SetSize(static_cast<int>(8.5 * dpi_), | 78 page_size_.SetSize(static_cast<int>(8.5 * dpi_), |
79 static_cast<int>(11.0 * dpi_)); | 79 static_cast<int>(11.0 * dpi_)); |
80 content_size_.SetSize(static_cast<int>((7.5 * dpi_)), | 80 content_size_.SetSize(static_cast<int>((7.5 * dpi_)), |
81 static_cast<int>((10.0 * dpi_))); | 81 static_cast<int>((10.0 * dpi_))); |
82 margin_left_ = margin_top_ = static_cast<int>(0.5 * dpi_); | 82 margin_left_ = margin_top_ = static_cast<int>(0.5 * dpi_); |
83 printable_area_.SetRect(static_cast<int>(0.25 * dpi_), | 83 printable_area_.SetRect(static_cast<int>(0.25 * dpi_), |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 params->margin_left = margin_left_; | 305 params->margin_left = margin_left_; |
306 params->margin_top = margin_top_; | 306 params->margin_top = margin_top_; |
307 params->is_first_request = is_first_request_; | 307 params->is_first_request = is_first_request_; |
308 params->print_scaling_option = print_scaling_option_; | 308 params->print_scaling_option = print_scaling_option_; |
309 params->print_to_pdf = print_to_pdf_; | 309 params->print_to_pdf = print_to_pdf_; |
310 params->preview_request_id = preview_request_id_; | 310 params->preview_request_id = preview_request_id_; |
311 params->display_header_footer = display_header_footer_; | 311 params->display_header_footer = display_header_footer_; |
312 params->title = title_; | 312 params->title = title_; |
313 params->url = url_; | 313 params->url = url_; |
314 } | 314 } |
OLD | NEW |