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

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

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix print to pdf for window.print Created 9 years, 2 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> 9 #include <string>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void HandleShowSystemDialog(const base::ListValue* args); 111 void HandleShowSystemDialog(const base::ListValue* args);
112 112
113 // Brings up a dialog to allow the user to sign into cloud print. 113 // Brings up a dialog to allow the user to sign into cloud print.
114 // |args| is unused. 114 // |args| is unused.
115 void HandleSignin(const base::ListValue* args); 115 void HandleSignin(const base::ListValue* args);
116 116
117 // Brings up a web page to allow the user to configure cloud print. 117 // Brings up a web page to allow the user to configure cloud print.
118 // |args| is unused. 118 // |args| is unused.
119 void HandleManageCloudPrint(const base::ListValue* args); 119 void HandleManageCloudPrint(const base::ListValue* args);
120 120
121 // Reloads the initiator tab and closes the associated preview tab. |args| is 121 // Gathers UMA stats when the print preview tab is about to close.
122 // unused. 122 // |args| is unused.
123 void HandleReloadCrashedInitiatorTab(const base::ListValue* args); 123 void HandleClosePreviewTab(const base::ListValue* args);
124 124
125 // Asks the browser to show the native printer management dialog. 125 // Asks the browser to show the native printer management dialog.
126 // |args| is unused. 126 // |args| is unused.
127 void HandleManagePrinters(const base::ListValue* args); 127 void HandleManagePrinters(const base::ListValue* args);
128 128
129 // Asks the browser to show the cloud print dialog. 129 // Asks the browser to show the cloud print dialog.
130 void HandlePrintWithCloudPrint(); 130 void HandlePrintWithCloudPrint();
131 131
132 // Asks the browser to close the preview tab. |args| is unused.
133 void HandleClosePreviewTab(const base::ListValue* args);
134
135 // Asks the browser for the title of the initiator tab. 132 // Asks the browser for the title of the initiator tab.
136 // |args| is unused. 133 // |args| is unused.
137 void HandleGetInitiatorTabTitle(const base::ListValue* args); 134 void HandleGetInitiatorTabTitle(const base::ListValue* args);
138 135
139 // Sends the printer capabilities to the Web UI. |settings_info| contains 136 // Sends the printer capabilities to the Web UI. |settings_info| contains
140 // printer capabilities information. 137 // printer capabilities information.
141 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); 138 void SendPrinterCapabilities(const base::DictionaryValue& settings_info);
142 139
143 // Sends the default printer to the Web UI. 140 // Sends the default printer to the Web UI.
144 void SendDefaultPrinter(const base::StringValue& default_printer, 141 void SendDefaultPrinter(const base::StringValue& default_printer,
145 const base::StringValue& cloud_print_data); 142 const base::StringValue& cloud_print_data);
146 143
147 // Send the list of printers to the Web UI. 144 // Send the list of printers to the Web UI.
148 void SetupPrinterList(const base::ListValue& printers); 145 void SetupPrinterList(const base::ListValue& printers);
149 146
150 // Send whether cloud print integration should be enabled. 147 // Send whether cloud print integration should be enabled.
151 void SendCloudPrintEnabled(); 148 void SendCloudPrintEnabled();
152 149
153 // Send the PDF data to the cloud to print. 150 // Send the PDF data to the cloud to print.
154 void SendCloudPrintJob(const base::DictionaryValue& settings, 151 void SendCloudPrintJob(const base::DictionaryValue& settings,
155 std::string print_ticket); 152 std::string print_ticket);
156 153
157 // Gets the initiator tab for the print preview tab. 154 // Gets the initiator tab for the print preview tab.
158 TabContentsWrapper* GetInitiatorTab() const; 155 TabContentsWrapper* GetInitiatorTab() const;
159 156
160 // Closes the print preview tab.
161 void ClosePrintPreviewTab();
162
163 // Activates the initiator tab and close the preview tab. 157 // Activates the initiator tab and close the preview tab.
164 void ActivateInitiatorTabAndClosePreviewTab(); 158 void ActivateInitiatorTabAndClosePreviewTab();
165 159
166 // Adds all the recorded stats taken so far to histogram counts. 160 // Adds all the recorded stats taken so far to histogram counts.
167 void ReportStats(); 161 void ReportStats();
168 162
169 // Hides the preview tab for printing.
170 void HidePreviewTab();
171
172 // Clears initiator tab details for this preview tab. 163 // Clears initiator tab details for this preview tab.
173 void ClearInitiatorTabDetails(); 164 void ClearInitiatorTabDetails();
174 165
175 // Posts a task to save to pdf at |print_to_pdf_path_|. 166 // Posts a task to save to pdf at |print_to_pdf_path_|.
176 void PostPrintToPdfTask(); 167 void PostPrintToPdfTask();
177 168
178 // Pointer to current print system. 169 // Pointer to current print system.
179 scoped_refptr<printing::PrintBackend> print_backend_; 170 scoped_refptr<printing::PrintBackend> print_backend_;
180 171
181 // The underlying dialog object. 172 // The underlying dialog object.
(...skipping 18 matching lines...) Expand all
200 bool has_logged_printers_count_; 191 bool has_logged_printers_count_;
201 192
202 // Holds the path to the print to pdf request. It is empty if no such request 193 // Holds the path to the print to pdf request. It is empty if no such request
203 // exists. 194 // exists.
204 scoped_ptr<FilePath> print_to_pdf_path_; 195 scoped_ptr<FilePath> print_to_pdf_path_;
205 196
206 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 197 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
207 }; 198 };
208 199
209 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 200 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698