| 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 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // |arg| contains the ID of the printer whose capabilities are requested. | 202 // |arg| contains the ID of the printer whose capabilities are requested. |
| 203 void HandleGetExtensionPrinterCapabilities(const base::ListValue* args); | 203 void HandleGetExtensionPrinterCapabilities(const base::ListValue* args); |
| 204 | 204 |
| 205 void SendInitialSettings(const std::string& default_printer); | 205 void SendInitialSettings(const std::string& default_printer); |
| 206 | 206 |
| 207 // Send OAuth2 access token. | 207 // Send OAuth2 access token. |
| 208 void SendAccessToken(const std::string& type, | 208 void SendAccessToken(const std::string& type, |
| 209 const std::string& access_token); | 209 const std::string& access_token); |
| 210 | 210 |
| 211 // Sends the printer capabilities to the Web UI. |settings_info| contains | 211 // Sends the printer capabilities to the Web UI. |settings_info| contains |
| 212 // printer capabilities information. | 212 // printer capabilities information. If |settings_info| is empty, sends |
| 213 void SendPrinterCapabilities(const base::DictionaryValue* settings_info); | 213 // error notification to the Web UI instead. |
| 214 | 214 void SendPrinterCapabilities( |
| 215 // Sends error notification to the Web UI when unable to return the printer | 215 const std::string& printer_name, |
| 216 // capabilities. | 216 std::unique_ptr<base::DictionaryValue> settings_info); |
| 217 void SendFailedToGetPrinterCapabilities(const std::string& printer_name); | |
| 218 | 217 |
| 219 // Send the list of printers to the Web UI. | 218 // Send the list of printers to the Web UI. |
| 220 void SetupPrinterList(const base::ListValue* printers); | 219 void SetupPrinterList(const base::ListValue* printers); |
| 221 | 220 |
| 222 // Send whether cloud print integration should be enabled. | 221 // Send whether cloud print integration should be enabled. |
| 223 void SendCloudPrintEnabled(); | 222 void SendCloudPrintEnabled(); |
| 224 | 223 |
| 225 // Send the PDF data to the cloud to print. | 224 // Send the PDF data to the cloud to print. |
| 226 void SendCloudPrintJob(const base::RefCountedBytes* data); | 225 void SendCloudPrintJob(const base::RefCountedBytes* data); |
| 227 | 226 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // A print preview that is responsible for rendering the page after | 385 // A print preview that is responsible for rendering the page after |
| 387 // being processed by the DOM Distiller. | 386 // being processed by the DOM Distiller. |
| 388 std::unique_ptr<PrintPreviewDistiller> print_preview_distiller_; | 387 std::unique_ptr<PrintPreviewDistiller> print_preview_distiller_; |
| 389 | 388 |
| 390 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 389 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 391 | 390 |
| 392 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 391 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 393 }; | 392 }; |
| 394 | 393 |
| 395 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 394 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |