| 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 #include "chrome/browser/printing/print_job_manager.h" | 5 #include "chrome/browser/printing/print_job_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/printing/print_job.h" | 9 #include "chrome/browser/printing/print_job.h" |
| 10 #include "chrome/browser/printing/printer_query.h" | 10 #include "chrome/browser/printing/printer_query.h" |
| 11 #include "chrome/common/chrome_notification_types.h" | 11 #include "chrome/common/chrome_notification_types.h" |
| 12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "content/common/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "printing/printed_document.h" | 14 #include "printing/printed_document.h" |
| 15 #include "printing/printed_page.h" | 15 #include "printing/printed_page.h" |
| 16 | 16 |
| 17 namespace printing { | 17 namespace printing { |
| 18 | 18 |
| 19 PrintJobManager::PrintJobManager() { | 19 PrintJobManager::PrintJobManager() { |
| 20 registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, | 20 registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, |
| 21 NotificationService::AllSources()); | 21 content::NotificationService::AllSources()); |
| 22 } | 22 } |
| 23 | 23 |
| 24 PrintJobManager::~PrintJobManager() { | 24 PrintJobManager::~PrintJobManager() { |
| 25 base::AutoLock lock(lock_); | 25 base::AutoLock lock(lock_); |
| 26 queued_queries_.clear(); | 26 queued_queries_.clear(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void PrintJobManager::InitOnUIThread(PrefService* prefs) { | 29 void PrintJobManager::InitOnUIThread(PrefService* prefs) { |
| 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 31 printing_enabled_.Init(prefs::kPrintingEnabled, prefs, NULL); | 31 printing_enabled_.Init(prefs::kPrintingEnabled, prefs, NULL); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 break; | 158 break; |
| 159 } | 159 } |
| 160 default: { | 160 default: { |
| 161 NOTREACHED(); | 161 NOTREACHED(); |
| 162 break; | 162 break; |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace printing | 167 } // namespace printing |
| OLD | NEW |