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

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 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void HandleShowSystemDialog(const base::ListValue* args); 117 void HandleShowSystemDialog(const base::ListValue* args);
118 118
119 // Brings up a dialog to allow the user to sign into cloud print. 119 // Brings up a dialog to allow the user to sign into cloud print.
120 // |args| is unused. 120 // |args| is unused.
121 void HandleSignin(const base::ListValue* args); 121 void HandleSignin(const base::ListValue* args);
122 122
123 // Brings up a web page to allow the user to configure cloud print. 123 // Brings up a web page to allow the user to configure cloud print.
124 // |args| is unused. 124 // |args| is unused.
125 void HandleManageCloudPrint(const base::ListValue* args); 125 void HandleManageCloudPrint(const base::ListValue* args);
126 126
127 // Reloads the initiator tab and closes the associated preview tab. |args| is 127 // Gathers UMA stats when the print preview tab is about to close.
128 // unused. 128 // |args| is unused.
129 void HandleReloadCrashedInitiatorTab(const base::ListValue* args); 129 void HandleClosePreviewTab(const base::ListValue* args);
130 130
131 // Asks the browser to show the native printer management dialog. 131 // Asks the browser to show the native printer management dialog.
132 // |args| is unused. 132 // |args| is unused.
133 void HandleManagePrinters(const base::ListValue* args); 133 void HandleManagePrinters(const base::ListValue* args);
134 134
135 // Asks the browser to show the cloud print dialog. 135 // Asks the browser to show the cloud print dialog.
136 void HandlePrintWithCloudPrint(); 136 void HandlePrintWithCloudPrint();
137 137
138 // Asks the browser to close the preview tab. |args| is unused.
139 void HandleClosePreviewTab(const base::ListValue* args);
140
141 // Asks the browser for several settings that are needed before the first 138 // Asks the browser for several settings that are needed before the first
142 // preview is displayed. 139 // preview is displayed.
143 void HandleGetInitialSettings(const base::ListValue* args); 140 void HandleGetInitialSettings(const base::ListValue* args);
144 141
145 void SendInitialSettings( 142 void SendInitialSettings(
146 const std::string& default_printer, 143 const std::string& default_printer,
147 const std::string& cloud_print_data); 144 const std::string& cloud_print_data);
148 145
149 // Sends the printer capabilities to the Web UI. |settings_info| contains 146 // Sends the printer capabilities to the Web UI. |settings_info| contains
150 // printer capabilities information. 147 // printer capabilities information.
151 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); 148 void SendPrinterCapabilities(const base::DictionaryValue& settings_info);
152 149
153 // Send the list of printers to the Web UI. 150 // Send the list of printers to the Web UI.
154 void SetupPrinterList(const base::ListValue& printers); 151 void SetupPrinterList(const base::ListValue& printers);
155 152
156 // Send whether cloud print integration should be enabled. 153 // Send whether cloud print integration should be enabled.
157 void SendCloudPrintEnabled(); 154 void SendCloudPrintEnabled();
158 155
159 // Send the PDF data to the cloud to print. 156 // Send the PDF data to the cloud to print.
160 void SendCloudPrintJob(const base::DictionaryValue& settings, 157 void SendCloudPrintJob(const base::DictionaryValue& settings,
161 std::string print_ticket); 158 std::string print_ticket);
162 159
163 // Gets the initiator tab for the print preview tab. 160 // Gets the initiator tab for the print preview tab.
164 TabContentsWrapper* GetInitiatorTab() const; 161 TabContentsWrapper* GetInitiatorTab() const;
165 162
166 // Closes the print preview tab.
167 void ClosePrintPreviewTab();
168
169 // Activates the initiator tab and close the preview tab. 163 // Activates the initiator tab and close the preview tab.
170 void ActivateInitiatorTabAndClosePreviewTab(); 164 void ActivateInitiatorTabAndClosePreviewTab();
171 165
172 // Adds all the recorded stats taken so far to histogram counts. 166 // Adds all the recorded stats taken so far to histogram counts.
173 void ReportStats(); 167 void ReportStats();
174 168
175 // Hides the preview tab for printing.
176 void HidePreviewTab();
177
178 // Clears initiator tab details for this preview tab. 169 // Clears initiator tab details for this preview tab.
179 void ClearInitiatorTabDetails(); 170 void ClearInitiatorTabDetails();
180 171
181 // Posts a task to save to pdf at |print_to_pdf_path_|. 172 // Posts a task to save to pdf at |print_to_pdf_path_|.
182 void PostPrintToPdfTask(); 173 void PostPrintToPdfTask();
183 174
184 // Populates |settings| according to the current locale. 175 // Populates |settings| according to the current locale.
185 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); 176 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings);
186 177
187 // Populates |last_used_custom_margins| according to the last used margin 178 // Populates |last_used_custom_margins| according to the last used margin
(...skipping 28 matching lines...) Expand all
216 bool has_logged_printers_count_; 207 bool has_logged_printers_count_;
217 208
218 // Holds the path to the print to pdf request. It is empty if no such request 209 // Holds the path to the print to pdf request. It is empty if no such request
219 // exists. 210 // exists.
220 scoped_ptr<FilePath> print_to_pdf_path_; 211 scoped_ptr<FilePath> print_to_pdf_path_;
221 212
222 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 213 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
223 }; 214 };
224 215
225 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 216 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview_data_source.cc ('k') | chrome/browser/ui/webui/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698