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

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: do not listen for F1 key in JS 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
122 // unused.
123 void HandleReloadCrashedInitiatorTab(const base::ListValue* args);
124
125 // Asks the browser to show the native printer management dialog. 121 // Asks the browser to show the native printer management dialog.
126 // |args| is unused. 122 // |args| is unused.
127 void HandleManagePrinters(const base::ListValue* args); 123 void HandleManagePrinters(const base::ListValue* args);
128 124
129 // Asks the browser to show the cloud print dialog. 125 // Asks the browser to show the cloud print dialog.
130 void HandlePrintWithCloudPrint(); 126 void HandlePrintWithCloudPrint();
131 127
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. 128 // Asks the browser for the title of the initiator tab.
136 // |args| is unused. 129 // |args| is unused.
137 void HandleGetInitiatorTabTitle(const base::ListValue* args); 130 void HandleGetInitiatorTabTitle(const base::ListValue* args);
138 131
139 // Sends the printer capabilities to the Web UI. |settings_info| contains 132 // Sends the printer capabilities to the Web UI. |settings_info| contains
140 // printer capabilities information. 133 // printer capabilities information.
141 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); 134 void SendPrinterCapabilities(const base::DictionaryValue& settings_info);
142 135
143 // Sends the default printer to the Web UI. 136 // Sends the default printer to the Web UI.
144 void SendDefaultPrinter(const base::StringValue& default_printer, 137 void SendDefaultPrinter(const base::StringValue& default_printer,
145 const base::StringValue& cloud_print_data); 138 const base::StringValue& cloud_print_data);
146 139
147 // Send the list of printers to the Web UI. 140 // Send the list of printers to the Web UI.
148 void SetupPrinterList(const base::ListValue& printers); 141 void SetupPrinterList(const base::ListValue& printers);
149 142
150 // Send whether cloud print integration should be enabled. 143 // Send whether cloud print integration should be enabled.
151 void SendCloudPrintEnabled(); 144 void SendCloudPrintEnabled();
152 145
153 // Send the PDF data to the cloud to print. 146 // Send the PDF data to the cloud to print.
154 void SendCloudPrintJob(const base::DictionaryValue& settings, 147 void SendCloudPrintJob(const base::DictionaryValue& settings,
155 std::string print_ticket); 148 std::string print_ticket);
156 149
157 // Gets the initiator tab for the print preview tab. 150 // Gets the initiator tab for the print preview tab.
158 TabContentsWrapper* GetInitiatorTab() const; 151 TabContentsWrapper* GetInitiatorTab() const;
159 152
160 // Closes the print preview tab.
161 void ClosePrintPreviewTab();
162
163 // Activates the initiator tab and close the preview tab. 153 // Activates the initiator tab and close the preview tab.
164 void ActivateInitiatorTabAndClosePreviewTab(); 154 void ActivateInitiatorTabAndClosePreviewTab();
165 155
166 // Adds all the recorded stats taken so far to histogram counts. 156 // Adds all the recorded stats taken so far to histogram counts.
167 void ReportStats(); 157 void ReportStats();
168 158
169 // Hides the preview tab for printing.
170 void HidePreviewTab();
171
172 // Clears initiator tab details for this preview tab. 159 // Clears initiator tab details for this preview tab.
173 void ClearInitiatorTabDetails(); 160 void ClearInitiatorTabDetails();
174 161
175 // Posts a task to save to pdf at |print_to_pdf_path_|. 162 // Posts a task to save to pdf at |print_to_pdf_path_|.
176 void PostPrintToPdfTask(); 163 void PostPrintToPdfTask();
177 164
178 // Pointer to current print system. 165 // Pointer to current print system.
179 scoped_refptr<printing::PrintBackend> print_backend_; 166 scoped_refptr<printing::PrintBackend> print_backend_;
180 167
181 // The underlying dialog object. 168 // The underlying dialog object.
(...skipping 18 matching lines...) Expand all
200 bool has_logged_printers_count_; 187 bool has_logged_printers_count_;
201 188
202 // Holds the path to the print to pdf request. It is empty if no such request 189 // Holds the path to the print to pdf request. It is empty if no such request
203 // exists. 190 // exists.
204 scoped_ptr<FilePath> print_to_pdf_path_; 191 scoped_ptr<FilePath> print_to_pdf_path_;
205 192
206 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 193 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
207 }; 194 };
208 195
209 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 196 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698