| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Sets the next response handler to the specifed data handler. | 223 // Sets the next response handler to the specifed data handler. |
| 224 void SetNextDataHandler(DataHandler handler); | 224 void SetNextDataHandler(DataHandler handler); |
| 225 | 225 |
| 226 void JobFailed(PrintJobError error); | 226 void JobFailed(PrintJobError error); |
| 227 void JobSpooled(cloud_print::PlatformJobId local_job_id); | 227 void JobSpooled(cloud_print::PlatformJobId local_job_id); |
| 228 // Returns false if printer info is up to date and no updating is needed. | 228 // Returns false if printer info is up to date and no updating is needed. |
| 229 bool UpdatePrinterInfo(); | 229 bool UpdatePrinterInfo(); |
| 230 bool HavePendingTasks(); | 230 bool HavePendingTasks(); |
| 231 void FailedFetchingJobData(); | 231 void FailedFetchingJobData(); |
| 232 | 232 |
| 233 // Callback that asynchronously receives printer caps and defaults. |
| 234 void OnReceivePrinterCaps( |
| 235 bool succeeded, |
| 236 const std::string& printer_name, |
| 237 const printing::PrinterCapsAndDefaults& caps_and_defaults); |
| 238 |
| 233 // Called on print_thread_. | 239 // Called on print_thread_. |
| 234 void DoPrint(const JobDetails& job_details, | 240 void DoPrint(const JobDetails& job_details, |
| 235 const std::string& printer_name); | 241 const std::string& printer_name); |
| 236 | 242 |
| 237 scoped_refptr<CloudPrintURLFetcher> request_; | 243 scoped_refptr<CloudPrintURLFetcher> request_; |
| 238 scoped_refptr<cloud_print::PrintSystem> print_system_; | 244 scoped_refptr<cloud_print::PrintSystem> print_system_; |
| 239 printing::PrinterBasicInfo printer_info_; | 245 printing::PrinterBasicInfo printer_info_; |
| 240 PrinterInfoFromCloud printer_info_cloud_; | 246 PrinterInfoFromCloud printer_info_cloud_; |
| 241 std::string auth_token_; | 247 std::string auth_token_; |
| 242 GURL cloud_print_server_url_; | 248 GURL cloud_print_server_url_; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); | 291 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); |
| 286 }; | 292 }; |
| 287 | 293 |
| 288 // This typedef is to workaround the issue with certain versions of | 294 // This typedef is to workaround the issue with certain versions of |
| 289 // Visual Studio where it gets confused between multiple Delegate | 295 // Visual Studio where it gets confused between multiple Delegate |
| 290 // classes and gives a C2500 error. (I saw this error on the try bots - | 296 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 291 // the workaround was not needed for my machine). | 297 // the workaround was not needed for my machine). |
| 292 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 298 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
| 293 | 299 |
| 294 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 300 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
| OLD | NEW |