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 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 namespace print_dialog_cloud { | 32 namespace print_dialog_cloud { |
33 | 33 |
34 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 34 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
35 | 35 |
36 // Creates a print dialog to print a file on disk. | 36 // Creates a print dialog to print a file on disk. |
37 // Called on the FILE or UI thread. Even though this may start up a modal | 37 // Called on the FILE or UI thread. Even though this may start up a modal |
38 // dialog, it will return immediately. The dialog is handled asynchronously. | 38 // dialog, it will return immediately. The dialog is handled asynchronously. |
39 // If non-NULL, |modal_parent| specifies a window that the print dialog is modal | 39 // If non-NULL, |modal_parent| specifies a window that the print dialog is modal |
40 // to. | 40 // to. |
41 void CreatePrintDialogForFile(content::BrowserContext* browser_context, | 41 void CreatePrintDialogForFile(content::BrowserContext* browser_context, |
42 gfx::NativeWindow modal_parent, | 42 gfx::NativeView modal_parent, |
43 const base::FilePath& path_to_file, | 43 const base::FilePath& path_to_file, |
44 const base::string16& print_job_title, | 44 const base::string16& print_job_title, |
45 const base::string16& print_ticket, | 45 const base::string16& print_ticket, |
46 const std::string& file_type); | 46 const std::string& file_type); |
47 | 47 |
48 // Creates a print dialog to print data in RAM. | 48 // Creates a print dialog to print data in RAM. |
49 // Called on the FILE or UI thread. Even though this may start up a modal | 49 // Called on the FILE or UI thread. Even though this may start up a modal |
50 // dialog, it will return immediately. The dialog is handled asynchronously. | 50 // dialog, it will return immediately. The dialog is handled asynchronously. |
51 // If non-NULL, |modal_parent| specifies a window that the print dialog is modal | 51 // If non-NULL, |modal_parent| specifies a window that the print dialog is modal |
52 // to. | 52 // to. |
53 void CreatePrintDialogForBytes(content::BrowserContext* browser_context, | 53 void CreatePrintDialogForBytes(content::BrowserContext* browser_context, |
54 gfx::NativeWindow modal_parent, | 54 gfx::NativeView modal_parent, |
55 const base::RefCountedMemory* data, | 55 const base::RefCountedMemory* data, |
56 const base::string16& print_job_title, | 56 const base::string16& print_job_title, |
57 const base::string16& print_ticket, | 57 const base::string16& print_ticket, |
58 const std::string& file_type); | 58 const std::string& file_type); |
59 | 59 |
60 // Parse switches from command_line and display the print dialog as appropriate. | 60 // Parse switches from command_line and display the print dialog as appropriate. |
61 bool CreatePrintDialogFromCommandLine(Profile* profile, | 61 bool CreatePrintDialogFromCommandLine(Profile* profile, |
62 const base::CommandLine& command_line); | 62 const base::CommandLine& command_line); |
63 | 63 |
64 // Creates a tab with Google 'sign in' or 'add account' page, based on | 64 // Creates a tab with Google 'sign in' or 'add account' page, based on |
65 // passed |add_account| value. | 65 // passed |add_account| value. |
66 // Calls |callback| when complete. | 66 // Calls |callback| when complete. |
67 void CreateCloudPrintSigninTab(Browser* browser, | 67 void CreateCloudPrintSigninTab(Browser* browser, |
68 bool add_account, | 68 bool add_account, |
69 const base::Closure& callback); | 69 const base::Closure& callback); |
70 | 70 |
71 } // namespace print_dialog_cloud | 71 } // namespace print_dialog_cloud |
72 | 72 |
73 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ | 73 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ |
OLD | NEW |