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 #include "chrome/browser/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 return did_start_ && 0 == module_ref_count_; | 673 return did_start_ && 0 == module_ref_count_; |
674 } | 674 } |
675 | 675 |
676 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() { | 676 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() { |
677 DCHECK(CalledOnValidThread()); | 677 DCHECK(CalledOnValidThread()); |
678 return print_job_manager_.get(); | 678 return print_job_manager_.get(); |
679 } | 679 } |
680 | 680 |
681 printing::PrintPreviewDialogController* | 681 printing::PrintPreviewDialogController* |
682 BrowserProcessImpl::print_preview_dialog_controller() { | 682 BrowserProcessImpl::print_preview_dialog_controller() { |
683 #if defined(ENABLE_FULL_PRINTING) | 683 #if defined(ENABLE_PRINT_PREVIEW) |
684 DCHECK(CalledOnValidThread()); | 684 DCHECK(CalledOnValidThread()); |
685 if (!print_preview_dialog_controller_.get()) | 685 if (!print_preview_dialog_controller_.get()) |
686 CreatePrintPreviewDialogController(); | 686 CreatePrintPreviewDialogController(); |
687 return print_preview_dialog_controller_.get(); | 687 return print_preview_dialog_controller_.get(); |
688 #else | 688 #else |
689 NOTIMPLEMENTED(); | 689 NOTIMPLEMENTED(); |
690 return NULL; | 690 return NULL; |
691 #endif | 691 #endif |
692 } | 692 } |
693 | 693 |
694 printing::BackgroundPrintingManager* | 694 printing::BackgroundPrintingManager* |
695 BrowserProcessImpl::background_printing_manager() { | 695 BrowserProcessImpl::background_printing_manager() { |
696 #if defined(ENABLE_FULL_PRINTING) | 696 #if defined(ENABLE_PRINT_PREVIEW) |
697 DCHECK(CalledOnValidThread()); | 697 DCHECK(CalledOnValidThread()); |
698 if (!background_printing_manager_.get()) | 698 if (!background_printing_manager_.get()) |
699 CreateBackgroundPrintingManager(); | 699 CreateBackgroundPrintingManager(); |
700 return background_printing_manager_.get(); | 700 return background_printing_manager_.get(); |
701 #else | 701 #else |
702 NOTIMPLEMENTED(); | 702 NOTIMPLEMENTED(); |
703 return NULL; | 703 return NULL; |
704 #endif | 704 #endif |
705 } | 705 } |
706 | 706 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 &profile_manager()->GetProfileInfoCache())); | 1087 &profile_manager()->GetProfileInfoCache())); |
1088 #endif | 1088 #endif |
1089 } | 1089 } |
1090 | 1090 |
1091 void BrowserProcessImpl::CreateStatusTray() { | 1091 void BrowserProcessImpl::CreateStatusTray() { |
1092 DCHECK(status_tray_.get() == NULL); | 1092 DCHECK(status_tray_.get() == NULL); |
1093 status_tray_.reset(StatusTray::Create()); | 1093 status_tray_.reset(StatusTray::Create()); |
1094 } | 1094 } |
1095 | 1095 |
1096 void BrowserProcessImpl::CreatePrintPreviewDialogController() { | 1096 void BrowserProcessImpl::CreatePrintPreviewDialogController() { |
1097 #if defined(ENABLE_FULL_PRINTING) | 1097 #if defined(ENABLE_PRINT_PREVIEW) |
1098 DCHECK(print_preview_dialog_controller_.get() == NULL); | 1098 DCHECK(print_preview_dialog_controller_.get() == NULL); |
1099 print_preview_dialog_controller_ = | 1099 print_preview_dialog_controller_ = |
1100 new printing::PrintPreviewDialogController(); | 1100 new printing::PrintPreviewDialogController(); |
1101 #else | 1101 #else |
1102 NOTIMPLEMENTED(); | 1102 NOTIMPLEMENTED(); |
1103 #endif | 1103 #endif |
1104 } | 1104 } |
1105 | 1105 |
1106 void BrowserProcessImpl::CreateBackgroundPrintingManager() { | 1106 void BrowserProcessImpl::CreateBackgroundPrintingManager() { |
1107 #if defined(ENABLE_FULL_PRINTING) | 1107 #if defined(ENABLE_PRINT_PREVIEW) |
1108 DCHECK(background_printing_manager_.get() == NULL); | 1108 DCHECK(background_printing_manager_.get() == NULL); |
1109 background_printing_manager_.reset(new printing::BackgroundPrintingManager()); | 1109 background_printing_manager_.reset(new printing::BackgroundPrintingManager()); |
1110 #else | 1110 #else |
1111 NOTIMPLEMENTED(); | 1111 NOTIMPLEMENTED(); |
1112 #endif | 1112 #endif |
1113 } | 1113 } |
1114 | 1114 |
1115 void BrowserProcessImpl::CreateSafeBrowsingService() { | 1115 void BrowserProcessImpl::CreateSafeBrowsingService() { |
1116 DCHECK(safe_browsing_service_.get() == NULL); | 1116 DCHECK(safe_browsing_service_.get() == NULL); |
1117 // Set this flag to true so that we don't retry indefinitely to | 1117 // Set this flag to true so that we don't retry indefinitely to |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 } | 1217 } |
1218 | 1218 |
1219 void BrowserProcessImpl::OnAutoupdateTimer() { | 1219 void BrowserProcessImpl::OnAutoupdateTimer() { |
1220 if (CanAutorestartForUpdate()) { | 1220 if (CanAutorestartForUpdate()) { |
1221 DLOG(WARNING) << "Detected update. Restarting browser."; | 1221 DLOG(WARNING) << "Detected update. Restarting browser."; |
1222 RestartBackgroundInstance(); | 1222 RestartBackgroundInstance(); |
1223 } | 1223 } |
1224 } | 1224 } |
1225 | 1225 |
1226 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1226 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |