| OLD | NEW |
| 1 // Copyright (c) 2011 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_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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/weak_ptr.h" |
| 15 #include "base/message_loop_proxy.h" | 16 #include "base/message_loop_proxy.h" |
| 16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 17 #include "base/time.h" | 18 #include "base/time.h" |
| 18 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" | 19 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" |
| 19 #include "chrome/service/cloud_print/job_status_updater.h" | 20 #include "chrome/service/cloud_print/job_status_updater.h" |
| 20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
| 21 #include "net/url_request/url_request_status.h" | 22 #include "net/url_request/url_request_status.h" |
| 22 #include "printing/backend/print_backend.h" | 23 #include "printing/backend/print_backend.h" |
| 23 | 24 |
| 24 class URLFetcher; | 25 class URLFetcher; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 bool job_check_pending_; | 283 bool job_check_pending_; |
| 283 bool printer_update_pending_; | 284 bool printer_update_pending_; |
| 284 | 285 |
| 285 // Some task in the state machine is in progress. | 286 // Some task in the state machine is in progress. |
| 286 bool task_in_progress_; | 287 bool task_in_progress_; |
| 287 scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_; | 288 scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_; |
| 288 typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList; | 289 typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList; |
| 289 JobStatusUpdaterList job_status_updater_list_; | 290 JobStatusUpdaterList job_status_updater_list_; |
| 290 | 291 |
| 291 base::TimeTicks last_job_fetch_time_; | 292 base::TimeTicks last_job_fetch_time_; |
| 293 base::WeakPtrFactory<PrinterJobHandler> weak_ptr_factory_; |
| 292 | 294 |
| 293 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); | 295 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); |
| 294 }; | 296 }; |
| 295 | 297 |
| 296 // This typedef is to workaround the issue with certain versions of | 298 // This typedef is to workaround the issue with certain versions of |
| 297 // Visual Studio where it gets confused between multiple Delegate | 299 // Visual Studio where it gets confused between multiple Delegate |
| 298 // classes and gives a C2500 error. (I saw this error on the try bots - | 300 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 299 // the workaround was not needed for my machine). | 301 // the workaround was not needed for my machine). |
| 300 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; | 302 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; |
| 301 | 303 |
| 302 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ | 304 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ |
| OLD | NEW |