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

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: rebase, no renderer changes Created 9 years, 1 month 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 // Asks the browser for the number formatting and measurement system according 136 // Asks the browser for the number formatting and measurement system according
140 // to the current locale. 137 // to the current locale.
141 void HandleGetNumberFormatAndMeasurementSystem(const base::ListValue* args); 138 void HandleGetNumberFormatAndMeasurementSystem(const base::ListValue* args);
142 139
143 // Sends the printer capabilities to the Web UI. |settings_info| contains 140 // Sends the printer capabilities to the Web UI. |settings_info| contains
144 // printer capabilities information. 141 // printer capabilities information.
145 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); 142 void SendPrinterCapabilities(const base::DictionaryValue& settings_info);
146 143
147 // Sends the default printer to the Web UI. 144 // Sends the default printer to the Web UI.
148 void SendDefaultPrinter(const base::StringValue& default_printer, 145 void SendDefaultPrinter(const base::StringValue& default_printer,
149 const base::StringValue& cloud_print_data); 146 const base::StringValue& cloud_print_data);
150 147
151 // Send the list of printers to the Web UI. 148 // Send the list of printers to the Web UI.
152 void SetupPrinterList(const base::ListValue& printers); 149 void SetupPrinterList(const base::ListValue& printers);
153 150
154 // Send whether cloud print integration should be enabled. 151 // Send whether cloud print integration should be enabled.
155 void SendCloudPrintEnabled(); 152 void SendCloudPrintEnabled();
156 153
157 // Send the PDF data to the cloud to print. 154 // Send the PDF data to the cloud to print.
158 void SendCloudPrintJob(const base::DictionaryValue& settings, 155 void SendCloudPrintJob(const base::DictionaryValue& settings,
159 std::string print_ticket); 156 std::string print_ticket);
160 157
161 // Gets the initiator tab for the print preview tab. 158 // Gets the initiator tab for the print preview tab.
162 TabContentsWrapper* GetInitiatorTab() const; 159 TabContentsWrapper* GetInitiatorTab() const;
163 160
164 // Closes the print preview tab.
165 void ClosePrintPreviewTab();
166
167 // Activates the initiator tab and close the preview tab. 161 // Activates the initiator tab and close the preview tab.
168 void ActivateInitiatorTabAndClosePreviewTab(); 162 void ActivateInitiatorTabAndClosePreviewTab();
169 163
170 // Adds all the recorded stats taken so far to histogram counts. 164 // Adds all the recorded stats taken so far to histogram counts.
171 void ReportStats(); 165 void ReportStats();
172 166
173 // Hides the preview tab for printing.
174 void HidePreviewTab();
175
176 // Clears initiator tab details for this preview tab. 167 // Clears initiator tab details for this preview tab.
177 void ClearInitiatorTabDetails(); 168 void ClearInitiatorTabDetails();
178 169
179 // Posts a task to save to pdf at |print_to_pdf_path_|. 170 // Posts a task to save to pdf at |print_to_pdf_path_|.
180 void PostPrintToPdfTask(); 171 void PostPrintToPdfTask();
181 172
182 // Pointer to current print system. 173 // Pointer to current print system.
183 scoped_refptr<printing::PrintBackend> print_backend_; 174 scoped_refptr<printing::PrintBackend> print_backend_;
184 175
185 // The underlying dialog object. 176 // The underlying dialog object.
(...skipping 18 matching lines...) Expand all
204 bool has_logged_printers_count_; 195 bool has_logged_printers_count_;
205 196
206 // Holds the path to the print to pdf request. It is empty if no such request 197 // Holds the path to the print to pdf request. It is empty if no such request
207 // exists. 198 // exists.
208 scoped_ptr<FilePath> print_to_pdf_path_; 199 scoped_ptr<FilePath> print_to_pdf_path_;
209 200
210 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 201 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
211 }; 202 };
212 203
213 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 204 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698