OLD | NEW |
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/browser/printing/print_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" |
6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" |
7 | 7 |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 // TODO(scottbyer): Get a Linux/ChromeOS edge for PrintSettings | 397 // TODO(scottbyer): Get a Linux/ChromeOS edge for PrintSettings |
398 // working so that we can get the default values from there. Fix up | 398 // working so that we can get the default values from there. Fix up |
399 // PrintWebViewHelper to do the same. | 399 // PrintWebViewHelper to do the same. |
400 const int kDPI = 72; | 400 const int kDPI = 72; |
401 const int kWidth = static_cast<int>((8.5-0.25-0.25)*kDPI); | 401 const int kWidth = static_cast<int>((8.5-0.25-0.25)*kDPI); |
402 const int kHeight = static_cast<int>((11-0.25-0.56)*kDPI); | 402 const int kHeight = static_cast<int>((11-0.25-0.56)*kDPI); |
403 const double kMinPageShrink = 1.25; | 403 const double kMinPageShrink = 1.25; |
404 const double kMaxPageShrink = 2.0; | 404 const double kMaxPageShrink = 2.0; |
405 | 405 |
406 PrintMsg_Print_Params default_settings; | 406 PrintMsg_Print_Params default_settings; |
407 default_settings.printable_size = gfx::Size(kWidth, kHeight); | 407 default_settings.content_size = gfx::Size(kWidth, kHeight); |
408 default_settings.dpi = kDPI; | 408 default_settings.dpi = kDPI; |
409 default_settings.min_shrink = kMinPageShrink; | 409 default_settings.min_shrink = kMinPageShrink; |
410 default_settings.max_shrink = kMaxPageShrink; | 410 default_settings.max_shrink = kMaxPageShrink; |
411 default_settings.desired_dpi = kDPI; | 411 default_settings.desired_dpi = kDPI; |
412 default_settings.document_cookie = 0; | 412 default_settings.document_cookie = 0; |
413 default_settings.selection_only = false; | 413 default_settings.selection_only = false; |
414 default_settings.preview_request_id = 0; | 414 default_settings.preview_request_id = 0; |
415 default_settings.is_first_request = true; | 415 default_settings.is_first_request = true; |
416 | 416 |
417 if (!GetPageSetupParameters(json, default_settings)) { | 417 if (!GetPageSetupParameters(json, default_settings)) { |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 file_type, | 716 file_type, |
717 false, | 717 false, |
718 delete_on_close); | 718 delete_on_close); |
719 return true; | 719 return true; |
720 } | 720 } |
721 } | 721 } |
722 return false; | 722 return false; |
723 } | 723 } |
724 | 724 |
725 } // end namespace | 725 } // end namespace |
OLD | NEW |