| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // async HTTP request) and worse yet, on Windows and Chrome OS, the opened | 214 // async HTTP request) and worse yet, on Windows and Chrome OS, the opened |
| 215 // window opens behind the initiator window. | 215 // window opens behind the initiator window. |
| 216 void HandleForceOpenNewTab(const base::ListValue* args); | 216 void HandleForceOpenNewTab(const base::ListValue* args); |
| 217 | 217 |
| 218 void HandleGetPrivetPrinterCapabilities(const base::ListValue* arg); | 218 void HandleGetPrivetPrinterCapabilities(const base::ListValue* arg); |
| 219 | 219 |
| 220 // Requests an extension managed printer's capabilities. | 220 // Requests an extension managed printer's capabilities. |
| 221 // |arg| contains the ID of the printer whose capabilities are requested. | 221 // |arg| contains the ID of the printer whose capabilities are requested. |
| 222 void HandleGetExtensionPrinterCapabilities(const base::ListValue* args); | 222 void HandleGetExtensionPrinterCapabilities(const base::ListValue* args); |
| 223 | 223 |
| 224 void SendInitialSettings(const std::string& default_printer); | 224 void SendInitialSettings(const std::string& callback_id, |
| 225 const std::string& default_printer); |
| 225 | 226 |
| 226 // Send OAuth2 access token. | 227 // Send OAuth2 access token. |
| 227 void SendAccessToken(const std::string& type, | 228 void SendAccessToken(const std::string& type, |
| 228 const std::string& access_token); | 229 const std::string& access_token); |
| 229 | 230 |
| 230 // Sends the printer capabilities to the Web UI. |settings_info| contains | 231 // Sends the printer capabilities to the Web UI. |settings_info| contains |
| 231 // printer capabilities information. If |settings_info| is empty, sends | 232 // printer capabilities information. If |settings_info| is empty, sends |
| 232 // error notification to the Web UI instead. | 233 // error notification to the Web UI instead. |
| 233 void SendPrinterCapabilities( | 234 void SendPrinterCapabilities( |
| 234 const std::string& printer_name, | 235 const std::string& printer_name, |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // Proxy for calls to the print backend. Lazily initialized since web_ui() is | 401 // Proxy for calls to the print backend. Lazily initialized since web_ui() is |
| 401 // not available at construction time. | 402 // not available at construction time. |
| 402 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; | 403 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; |
| 403 | 404 |
| 404 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 405 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 405 | 406 |
| 406 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 407 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 410 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |