Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler.h

Issue 7038028: Initial support for cloudprint in print preview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/shell_dialogs.h" 13 #include "chrome/browser/ui/shell_dialogs.h"
12 #include "content/browser/webui/web_ui.h" 14 #include "content/browser/webui/web_ui.h"
13 15
14 class FilePath; 16 class FilePath;
15 class FundamentalValue; 17 class FundamentalValue;
16 class PrintSystemTaskProxy; 18 class PrintSystemTaskProxy;
17 class StringValue; 19 class StringValue;
18 20
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void HandleHidePreview(const ListValue* args); 63 void HandleHidePreview(const ListValue* args);
62 64
63 // Get the printer capabilities. 65 // Get the printer capabilities.
64 // First element of |args| is the printer name. 66 // First element of |args| is the printer name.
65 void HandleGetPrinterCapabilities(const ListValue* args); 67 void HandleGetPrinterCapabilities(const ListValue* args);
66 68
67 // Ask the initiator renderer to show the native print system dialog. 69 // Ask the initiator renderer to show the native print system dialog.
68 // |args| is unused. 70 // |args| is unused.
69 void HandleShowSystemDialog(const ListValue* args); 71 void HandleShowSystemDialog(const ListValue* args);
70 72
73 // Bring up a web page to allow the user to configure cloud print.
74 // |args| is unused.
75 void HandleManageCloudPrint(const ListValue* args);
76
71 // Ask the browser to show the native printer management dialog. 77 // Ask the browser to show the native printer management dialog.
72 // |args| is unused. 78 // |args| is unused.
73 void HandleManagePrinters(const ListValue* args); 79 void HandleManagePrinters(const ListValue* args);
74 80
75 // Ask the browser to close the preview tab. 81 // Ask the browser to close the preview tab.
76 // |args| is unused. 82 // |args| is unused.
77 void HandleClosePreviewTab(const ListValue* args); 83 void HandleClosePreviewTab(const ListValue* args);
78 84
79 // Send the printer capabilities to the Web UI. 85 // Send the printer capabilities to the Web UI.
80 // |settings_info| contains printer capabilities information. 86 // |settings_info| contains printer capabilities information.
81 void SendPrinterCapabilities(const DictionaryValue& settings_info); 87 void SendPrinterCapabilities(const DictionaryValue& settings_info);
82 88
83 // Send the default printer to the Web UI. 89 // Send the default printer to the Web UI.
84 void SendDefaultPrinter(const StringValue& default_printer); 90 void SendDefaultPrinter(const StringValue& default_printer);
85 91
86 // Send the list of printers to the Web UI. 92 // Send the list of printers to the Web UI.
87 void SendPrinterList(const ListValue& printers); 93 void SetupPrinterList(const ListValue& printers);
94
95 // Send whether cloud print integration should be enabled.
96 void SendCloudPrintEnabled();
97
98 // Send the PDF data to the cloud to print.
99 void SendCloudPrintJob(const DictionaryValue& settings,
100 std::string print_ticket);
88 101
89 // Helper function to get the initiator tab for the print preview tab. 102 // Helper function to get the initiator tab for the print preview tab.
90 TabContents* GetInitiatorTab(); 103 TabContents* GetInitiatorTab();
91 104
92 // Helper function to close the print preview tab. 105 // Helper function to close the print preview tab.
93 void ClosePrintPreviewTab(); 106 void ClosePrintPreviewTab();
94 107
95 // Helper function to activate the initiator tab and close the preview tab. 108 // Helper function to activate the initiator tab and close the preview tab.
96 void ActivateInitiatorTabAndClosePreviewTab(); 109 void ActivateInitiatorTabAndClosePreviewTab();
97 110
(...skipping 25 matching lines...) Expand all
123 // Whether we have already logged a failed print preview. 136 // Whether we have already logged a failed print preview.
124 bool reported_failed_preview_; 137 bool reported_failed_preview_;
125 138
126 // Whether we have already logged the number of printers this session. 139 // Whether we have already logged the number of printers this session.
127 bool has_logged_printers_count_; 140 bool has_logged_printers_count_;
128 141
129 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 142 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
130 }; 143 };
131 144
132 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 145 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698