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 | 6 |
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 signin::ManageAccountsParams()); | 724 signin::ManageAccountsParams()); |
725 } else { | 725 } else { |
726 GURL url = add_account ? cloud_devices::GetCloudPrintAddAccountURL() | 726 GURL url = add_account ? cloud_devices::GetCloudPrintAddAccountURL() |
727 : cloud_devices::GetCloudPrintSigninURL(); | 727 : cloud_devices::GetCloudPrintSigninURL(); |
728 content::WebContents* web_contents = | 728 content::WebContents* web_contents = |
729 browser->OpenURL(content::OpenURLParams( | 729 browser->OpenURL(content::OpenURLParams( |
730 google_util::AppendGoogleLocaleParam( | 730 google_util::AppendGoogleLocaleParam( |
731 url, g_browser_process->GetApplicationLocale()), | 731 url, g_browser_process->GetApplicationLocale()), |
732 content::Referrer(), | 732 content::Referrer(), |
733 NEW_FOREGROUND_TAB, | 733 NEW_FOREGROUND_TAB, |
734 content::PAGE_TRANSITION_AUTO_BOOKMARK, | 734 ui::PAGE_TRANSITION_AUTO_BOOKMARK, |
735 false)); | 735 false)); |
736 new SignInObserver(web_contents, cloud_devices::GetCloudPrintURL(), | 736 new SignInObserver(web_contents, cloud_devices::GetCloudPrintURL(), |
737 callback); | 737 callback); |
738 } | 738 } |
739 } | 739 } |
740 | 740 |
741 void CreatePrintDialogForBytes(content::BrowserContext* browser_context, | 741 void CreatePrintDialogForBytes(content::BrowserContext* browser_context, |
742 gfx::NativeWindow modal_parent, | 742 gfx::NativeWindow modal_parent, |
743 const base::RefCountedMemory* data, | 743 const base::RefCountedMemory* data, |
744 const base::string16& print_job_title, | 744 const base::string16& print_job_title, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 | 777 |
778 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, | 778 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, |
779 cloud_print_file, print_job_title, print_job_print_ticket, file_type); | 779 cloud_print_file, print_job_title, print_job_print_ticket, file_type); |
780 return true; | 780 return true; |
781 } | 781 } |
782 } | 782 } |
783 return false; | 783 return false; |
784 } | 784 } |
785 | 785 |
786 } // namespace print_dialog_cloud | 786 } // namespace print_dialog_cloud |
OLD | NEW |