OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // TODO(maruel): Have them vanish after a timeout (~5 minutes?) | 45 // TODO(maruel): Have them vanish after a timeout (~5 minutes?) |
46 void QueuePrinterQuery(PrinterQuery* job); | 46 void QueuePrinterQuery(PrinterQuery* job); |
47 | 47 |
48 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be | 48 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be |
49 // called from any thread. Current use case is poping from the browser thread. | 49 // called from any thread. Current use case is poping from the browser thread. |
50 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job); | 50 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job); |
51 | 51 |
52 static void RegisterPrefs(PrefService* prefs); | 52 static void RegisterPrefs(PrefService* prefs); |
53 | 53 |
54 // NotificationObserver | 54 // NotificationObserver |
55 virtual void Observe(NotificationType type, | 55 virtual void Observe(int type, |
56 const NotificationSource& source, | 56 const NotificationSource& source, |
57 const NotificationDetails& details); | 57 const NotificationDetails& details); |
58 | 58 |
59 bool printing_enabled() { | 59 bool printing_enabled() { |
60 return *printing_enabled_; | 60 return *printing_enabled_; |
61 } | 61 } |
62 | 62 |
63 private: | 63 private: |
64 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; | 64 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; |
65 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; | 65 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; |
(...skipping 17 matching lines...) Expand all Loading... |
83 | 83 |
84 // Current print jobs that are active. | 84 // Current print jobs that are active. |
85 PrintJobs current_jobs_; | 85 PrintJobs current_jobs_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); | 87 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace printing | 90 } // namespace printing |
91 | 91 |
92 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ | 92 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
OLD | NEW |