| 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/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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 // Called from the UI thread, starts up the dialog. | 593 // Called from the UI thread, starts up the dialog. |
| 594 void CreateDialogImpl(const FilePath& path_to_file, | 594 void CreateDialogImpl(const FilePath& path_to_file, |
| 595 const string16& print_job_title, | 595 const string16& print_job_title, |
| 596 const string16& print_ticket, | 596 const string16& print_ticket, |
| 597 const std::string& file_type, | 597 const std::string& file_type, |
| 598 bool modal, | 598 bool modal, |
| 599 bool delete_on_close) { | 599 bool delete_on_close) { |
| 600 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 600 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 601 Browser* browser = BrowserList::GetLastActive(); | 601 Browser* browser = BrowserList::GetLastActive(); |
| 602 | 602 |
| 603 const int kDefaultWidth = 497; | 603 const int kDefaultWidth = 912; |
| 604 const int kDefaultHeight = 332; | 604 const int kDefaultHeight = 633; |
| 605 string16 job_title = print_job_title; | 605 string16 job_title = print_job_title; |
| 606 Profile* profile = NULL; | 606 Profile* profile = NULL; |
| 607 if (modal) { | 607 if (modal) { |
| 608 if (job_title.empty()) { | 608 if (job_title.empty()) { |
| 609 WebContents* web_contents = browser->GetSelectedWebContents(); | 609 WebContents* web_contents = browser->GetSelectedWebContents(); |
| 610 if (web_contents) | 610 if (web_contents) |
| 611 job_title = web_contents->GetTitle(); | 611 job_title = web_contents->GetTitle(); |
| 612 } | 612 } |
| 613 profile = browser->GetProfile(); | 613 profile = browser->GetProfile(); |
| 614 } else { | 614 } else { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 file_type, | 726 file_type, |
| 727 false, | 727 false, |
| 728 delete_on_close); | 728 delete_on_close); |
| 729 return true; | 729 return true; |
| 730 } | 730 } |
| 731 } | 731 } |
| 732 return false; | 732 return false; |
| 733 } | 733 } |
| 734 | 734 |
| 735 } // end namespace | 735 } // end namespace |
| OLD | NEW |