Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / printing / print_dialog_cloud.h
blob9fbf2c8b7af061dfea1235320915bee90a853b1d
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_
8 #include <string>
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"
16 class Browser;
17 class CommandLine;
18 class Profile;
20 namespace base {
21 class FilePath;
24 namespace content {
25 class BrowserContext;
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
40 // to.
41 void CreatePrintDialogForFile(content::BrowserContext* browser_context,
42 gfx::NativeWindow 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,
47 bool delete_on_close);
49 // Creates a print dialog to print data in RAM.
50 // Called on the FILE or UI thread. Even though this may start up a modal
51 // dialog, it will return immediately. The dialog is handled asynchronously.
52 // If non-NULL, |modal_parent| specifies a window that the print dialog is modal
53 // to.
54 void CreatePrintDialogForBytes(content::BrowserContext* browser_context,
55 gfx::NativeWindow modal_parent,
56 const base::RefCountedMemory* data,
57 const base::string16& print_job_title,
58 const base::string16& print_ticket,
59 const std::string& file_type);
61 // Parse switches from command_line and display the print dialog as appropriate.
62 bool CreatePrintDialogFromCommandLine(Profile* profile,
63 const CommandLine& command_line);
65 // Creates a tab with Google sinnin page.
66 // Calls |callback| when complete.
67 void CreateCloudPrintSigninTab(Browser* browser,
68 const base::Closure& callback);
70 } // namespace print_dialog_cloud
72 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_CLOUD_H_