| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 public: | 59 public: |
| 60 PrintJobManager(); | 60 PrintJobManager(); |
| 61 virtual ~PrintJobManager(); | 61 virtual ~PrintJobManager(); |
| 62 | 62 |
| 63 // On browser quit, we should wait to have the print job finished. | 63 // On browser quit, we should wait to have the print job finished. |
| 64 void Shutdown(); | 64 void Shutdown(); |
| 65 | 65 |
| 66 // content::NotificationObserver | 66 // content::NotificationObserver |
| 67 virtual void Observe(int type, | 67 virtual void Observe(int type, |
| 68 const content::NotificationSource& source, | 68 const content::NotificationSource& source, |
| 69 const content::NotificationDetails& details) OVERRIDE; | 69 const content::NotificationDetails& details) override; |
| 70 | 70 |
| 71 // Returns queries queue. Never returns NULL. Must be called on Browser UI | 71 // Returns queries queue. Never returns NULL. Must be called on Browser UI |
| 72 // Thread. Reference could be stored and used from any thread. | 72 // Thread. Reference could be stored and used from any thread. |
| 73 scoped_refptr<PrintQueriesQueue> queue(); | 73 scoped_refptr<PrintQueriesQueue> queue(); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 typedef std::set<scoped_refptr<PrintJob> > PrintJobs; | 76 typedef std::set<scoped_refptr<PrintJob> > PrintJobs; |
| 77 | 77 |
| 78 // Processes a NOTIFY_PRINT_JOB_EVENT notification. | 78 // Processes a NOTIFY_PRINT_JOB_EVENT notification. |
| 79 void OnPrintJobEvent(PrintJob* print_job, | 79 void OnPrintJobEvent(PrintJob* print_job, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 91 scoped_refptr<PrintQueriesQueue> queue_; | 91 scoped_refptr<PrintQueriesQueue> queue_; |
| 92 | 92 |
| 93 bool is_shutdown_; | 93 bool is_shutdown_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); | 95 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace printing | 98 } // namespace printing |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ | 100 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
| OLD | NEW |