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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 const double kMaxPageShrink = 2.0; | 369 const double kMaxPageShrink = 2.0; |
370 | 370 |
371 PrintMsg_Print_Params default_settings; | 371 PrintMsg_Print_Params default_settings; |
372 default_settings.printable_size = gfx::Size(kWidth, kHeight); | 372 default_settings.printable_size = gfx::Size(kWidth, kHeight); |
373 default_settings.dpi = kDPI; | 373 default_settings.dpi = kDPI; |
374 default_settings.min_shrink = kMinPageShrink; | 374 default_settings.min_shrink = kMinPageShrink; |
375 default_settings.max_shrink = kMaxPageShrink; | 375 default_settings.max_shrink = kMaxPageShrink; |
376 default_settings.desired_dpi = kDPI; | 376 default_settings.desired_dpi = kDPI; |
377 default_settings.document_cookie = 0; | 377 default_settings.document_cookie = 0; |
378 default_settings.selection_only = false; | 378 default_settings.selection_only = false; |
| 379 default_settings.preview_request_id = 0; |
| 380 default_settings.is_first_request = true; |
379 | 381 |
380 if (!GetPageSetupParameters(json, default_settings)) { | 382 if (!GetPageSetupParameters(json, default_settings)) { |
381 NOTREACHED(); | 383 NOTREACHED(); |
382 return; | 384 return; |
383 } | 385 } |
384 | 386 |
385 // TODO(scottbyer) - Here is where we would kick the originating | 387 // TODO(scottbyer) - Here is where we would kick the originating |
386 // renderer thread with these new parameters in order to get it to | 388 // renderer thread with these new parameters in order to get it to |
387 // re-generate the PDF data and hand it back to us. window.print() is | 389 // re-generate the PDF data and hand it back to us. window.print() is |
388 // currently synchronous, so there's a lot of work to do to get to | 390 // currently synchronous, so there's a lot of work to do to get to |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 print_job_title, | 630 print_job_title, |
629 file_type, | 631 file_type, |
630 false); | 632 false); |
631 return true; | 633 return true; |
632 } | 634 } |
633 } | 635 } |
634 return false; | 636 return false; |
635 } | 637 } |
636 | 638 |
637 } // end namespace | 639 } // end namespace |
OLD | NEW |