| 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_PRINTING_PRINT_JOB_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 PrintDestinationInterface* destination() const { return destination_.get(); } | 52 PrintDestinationInterface* destination() const { return destination_.get(); } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; | 55 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; |
| 56 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; | 56 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; |
| 57 | 57 |
| 58 // Processes a NOTIFY_PRINT_JOB_EVENT notification. | 58 // Processes a NOTIFY_PRINT_JOB_EVENT notification. |
| 59 void OnPrintJobEvent(PrintJob* print_job, | 59 void OnPrintJobEvent(PrintJob* print_job, |
| 60 const JobEventDetails& event_details); | 60 const JobEventDetails& event_details); |
| 61 | 61 |
| 62 // Removes job from |current_jobs_|; |
| 63 void RemoveJob(PrintJob* print_job); |
| 64 |
| 62 content::NotificationRegistrar registrar_; | 65 content::NotificationRegistrar registrar_; |
| 63 | 66 |
| 64 // Used to serialize access to queued_workers_. | 67 // Used to serialize access to queued_workers_. |
| 65 base::Lock lock_; | 68 base::Lock lock_; |
| 66 | 69 |
| 67 PrinterQueries queued_queries_; | 70 PrinterQueries queued_queries_; |
| 68 | 71 |
| 69 scoped_refptr<PrintDestinationInterface> destination_; | 72 scoped_refptr<PrintDestinationInterface> destination_; |
| 70 | 73 |
| 71 // Current print jobs that are active. | 74 // Current print jobs that are active. |
| 72 PrintJobs current_jobs_; | 75 PrintJobs current_jobs_; |
| 73 | 76 |
| 74 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); | 77 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace printing | 80 } // namespace printing |
| 78 | 81 |
| 79 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ | 82 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
| OLD | NEW |