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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "base/memory/ref_counted_memory.h"
13 #include "base/strings/string16.h"
14 #include "ui/gfx/native_widget_types.h"
28 namespace user_prefs
{
29 class PrefRegistrySyncable
;
32 namespace print_dialog_cloud
{
34 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable
* registry
);
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
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
41 void CreatePrintDialogForFile(content::BrowserContext
* browser_context
,
42 gfx::NativeView modal_parent
,
43 const base::FilePath
& path_to_file
,
44 const base::string16
& print_job_title
,
45 const base::string16
& print_ticket
,
46 const std::string
& file_type
);
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
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
53 void CreatePrintDialogForBytes(content::BrowserContext
* browser_context
,
54 gfx::NativeView modal_parent
,
55 const base::RefCountedMemory
* data
,
56 const base::string16
& print_job_title
,
57 const base::string16
& print_ticket
,
58 const std::string
& file_type
);
60 // Parse switches from command_line and display the print dialog as appropriate.
61 bool CreatePrintDialogFromCommandLine(Profile
* profile
,
62 const base::CommandLine
& command_line
);
64 // Creates a tab with Google 'sign in' or 'add account' page, based on
65 // passed |add_account| value.
66 // Calls |callback| when complete.
67 void CreateCloudPrintSigninTab(Browser
* browser
,
69 const base::Closure
& callback
);
71 } // namespace print_dialog_cloud
73 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_