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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "ui/gfx/native_widget_types.h" | |
15 | 16 |
16 class FilePath; | 17 class FilePath; |
17 class CommandLine; | 18 class CommandLine; |
18 | 19 |
20 namespace content { | |
21 class BrowserContext; | |
22 } | |
23 | |
19 namespace print_dialog_cloud { | 24 namespace print_dialog_cloud { |
20 | 25 |
21 // Creates a print dialog to print a file on disk. | 26 // Creates a print dialog to print a file on disk. |
22 // Called on the FILE or UI thread. Even though this may start up a modal | 27 // Called on the FILE or UI thread. Even though this may start up a modal |
23 // dialog, it will return immediately. The dialog is handled asynchronously. | 28 // dialog, it will return immediately. The dialog is handled asynchronously. |
24 void CreatePrintDialogForFile(const FilePath& path_to_file, | 29 void CreatePrintDialogForFile(content::BrowserContext* browser_context, |
30 gfx::NativeWindow modal_parent, | |
Albert Bodenhamer
2012/05/21 22:36:55
In Windows it's possible to create a modal dialog
| |
31 const FilePath& path_to_file, | |
25 const string16& print_job_title, | 32 const string16& print_job_title, |
26 const string16& print_ticket, | 33 const string16& print_ticket, |
27 const std::string& file_type, | 34 const std::string& file_type, |
28 bool modal, | |
29 bool delete_on_close); | 35 bool delete_on_close); |
30 | 36 |
31 // Creates a print dialog to print data in RAM. | 37 // Creates a print dialog to print data in RAM. |
32 // Called on the FILE or UI thread. Even though this may start up a modal | 38 // Called on the FILE or UI thread. Even though this may start up a modal |
33 // dialog, it will return immediately. The dialog is handled asynchronously. | 39 // dialog, it will return immediately. The dialog is handled asynchronously. |
34 void CreatePrintDialogForBytes(scoped_refptr<base::RefCountedBytes> data, | 40 void CreatePrintDialogForBytes(content::BrowserContext* browser_context, |
41 gfx::NativeWindow modal_parent, | |
42 scoped_refptr<base::RefCountedBytes> data, | |
35 const string16& print_job_title, | 43 const string16& print_job_title, |
36 const string16& print_ticket, | 44 const string16& print_ticket, |
37 const std::string& file_type, | 45 const std::string& file_type); |
38 bool modal); | |
39 | 46 |
40 // Parse switches from command_line and display the print dialog as appropriate. | 47 // Parse switches from command_line and display the print dialog as appropriate. |
48 // Uses the default profile. | |
41 bool CreatePrintDialogFromCommandLine(const CommandLine& command_line); | 49 bool CreatePrintDialogFromCommandLine(const CommandLine& command_line); |
42 | 50 |
43 // Creates a dialog for signing into cloud print. | 51 // Creates a dialog for signing into cloud print. |
44 // The dialog will call |callback| when complete. | 52 // The dialog will call |callback| when complete. |
45 // Called on the UI thread. Even though this starts up a modal | 53 // Called on the UI thread. Even though this starts up a modal |
46 // dialog, it will return immediately. The dialog is handled asynchronously. | 54 // dialog, it will return immediately. The dialog is handled asynchronously. |
47 void CreateCloudPrintSigninDialog(const base::Closure& callback); | 55 void CreateCloudPrintSigninDialog(content::BrowserContext* browser_context, |
56 gfx::NativeWindow modal_parent, | |
57 const base::Closure& callback); | |
48 | 58 |
49 } // end namespace | 59 } // end namespace |
50 | 60 |
51 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ | 61 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_ |
OLD | NEW |