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 | 45 |
46 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be | 46 // Pops a queued PrintJobWorkerOwner object that was previously queued. Can be |
47 // called from any thread. Current use case is poping from the browser thread. | 47 // called from any thread. Current use case is poping from the browser thread. |
48 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job); | 48 void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job); |
49 | 49 |
50 static void RegisterPrefs(PrefService* prefs); | 50 static void RegisterPrefs(PrefService* prefs); |
51 | 51 |
52 // content::NotificationObserver | 52 // content::NotificationObserver |
53 virtual void Observe(int type, | 53 virtual void Observe(int type, |
54 const content::NotificationSource& source, | 54 const content::NotificationSource& source, |
55 const content::NotificationDetails& details); | 55 const content::NotificationDetails& details) OVERRIDE; |
56 | 56 |
57 bool printing_enabled() { | 57 bool printing_enabled() { |
58 return *printing_enabled_; | 58 return *printing_enabled_; |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
62 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; | 62 typedef std::vector<scoped_refptr<PrintJob> > PrintJobs; |
63 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; | 63 typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries; |
64 | 64 |
65 // Processes a NOTIFY_PRINT_JOB_EVENT notification. | 65 // Processes a NOTIFY_PRINT_JOB_EVENT notification. |
(...skipping 19 matching lines...) Expand all Loading... |
85 | 85 |
86 // Current print jobs that are active. | 86 // Current print jobs that are active. |
87 PrintJobs current_jobs_; | 87 PrintJobs current_jobs_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); | 89 DISALLOW_COPY_AND_ASSIGN(PrintJobManager); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace printing | 92 } // namespace printing |
93 | 93 |
94 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ | 94 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_ |
OLD | NEW |