OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // |args| is unused. | 138 // |args| is unused. |
139 void HandleManagePrinters(const base::ListValue* args); | 139 void HandleManagePrinters(const base::ListValue* args); |
140 | 140 |
141 // Asks the browser to show the cloud print dialog. | 141 // Asks the browser to show the cloud print dialog. |
142 void HandlePrintWithCloudPrint(); | 142 void HandlePrintWithCloudPrint(); |
143 | 143 |
144 // Asks the browser for several settings that are needed before the first | 144 // Asks the browser for several settings that are needed before the first |
145 // preview is displayed. | 145 // preview is displayed. |
146 void HandleGetInitialSettings(const base::ListValue* args); | 146 void HandleGetInitialSettings(const base::ListValue* args); |
147 | 147 |
| 148 // Reports histogram data for the print destination UI. |
| 149 void HandleReportDestinationEvent(const base::ListValue* args); |
| 150 |
148 void SendInitialSettings( | 151 void SendInitialSettings( |
149 const std::string& default_printer, | 152 const std::string& default_printer, |
150 const std::string& cloud_print_data); | 153 const std::string& cloud_print_data); |
151 | 154 |
152 // Sends the printer capabilities to the Web UI. |settings_info| contains | 155 // Sends the printer capabilities to the Web UI. |settings_info| contains |
153 // printer capabilities information. | 156 // printer capabilities information. |
154 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); | 157 void SendPrinterCapabilities(const base::DictionaryValue& settings_info); |
155 | 158 |
156 // Send the list of printers to the Web UI. | 159 // Send the list of printers to the Web UI. |
157 void SetupPrinterList(const base::ListValue& printers); | 160 void SetupPrinterList(const base::ListValue& printers); |
(...skipping 30 matching lines...) Expand all Loading... |
188 | 191 |
189 // The underlying dialog object. | 192 // The underlying dialog object. |
190 scoped_refptr<SelectFileDialog> select_file_dialog_; | 193 scoped_refptr<SelectFileDialog> select_file_dialog_; |
191 | 194 |
192 // A count of how many requests received to regenerate preview data. | 195 // A count of how many requests received to regenerate preview data. |
193 // Initialized to 0 then incremented and emitted to a histogram. | 196 // Initialized to 0 then incremented and emitted to a histogram. |
194 int regenerate_preview_request_count_; | 197 int regenerate_preview_request_count_; |
195 | 198 |
196 // A count of how many requests received to show manage printers dialog. | 199 // A count of how many requests received to show manage printers dialog. |
197 int manage_printers_dialog_request_count_; | 200 int manage_printers_dialog_request_count_; |
| 201 int manage_cloud_printers_dialog_request_count_; |
198 | 202 |
199 // Whether we have already logged a failed print preview. | 203 // Whether we have already logged a failed print preview. |
200 bool reported_failed_preview_; | 204 bool reported_failed_preview_; |
201 | 205 |
202 // Whether we have already logged the number of printers this session. | 206 // Whether we have already logged the number of printers this session. |
203 bool has_logged_printers_count_; | 207 bool has_logged_printers_count_; |
204 | 208 |
205 // 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 |
206 // exists. | 210 // exists. |
207 scoped_ptr<FilePath> print_to_pdf_path_; | 211 scoped_ptr<FilePath> print_to_pdf_path_; |
208 | 212 |
209 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 213 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
210 }; | 214 }; |
211 | 215 |
212 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 216 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |