Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2338)

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 10540033: Add ENABLE_PRINTING and disable it on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Arrange some ifdefs Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 0325007edbd2115cdd4b1cdc099b04b53dc5c64a..f3e5f0be7bb7b52be0f5d5dd865c364d4c991b44 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -144,7 +144,7 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
g_browser_process = this;
clipboard_.reset(new ui::Clipboard);
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
// Must be created after the NotificationService.
print_job_manager_.reset(new printing::PrintJobManager);
#endif
@@ -281,7 +281,7 @@ unsigned int BrowserProcessImpl::ReleaseModule() {
if (0 == module_ref_count_) {
release_last_reference_callstack_ = base::debug::StackTrace();
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
// Wait for the pending print jobs to finish. Don't do this later, since
// this might cause a nested message loop to run, and we don't want pending
// tasks to run once teardown has started.
@@ -499,27 +499,27 @@ printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
printing::PrintPreviewTabController*
BrowserProcessImpl::print_preview_tab_controller() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
- return NULL;
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(CalledOnValidThread());
if (!print_preview_tab_controller_.get())
CreatePrintPreviewTabController();
return print_preview_tab_controller_.get();
+#else
+ NOTIMPLEMENTED();
+ return NULL;
#endif
}
printing::BackgroundPrintingManager*
BrowserProcessImpl::background_printing_manager() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
- return NULL;
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(CalledOnValidThread());
if (!background_printing_manager_.get())
CreateBackgroundPrintingManager();
return background_printing_manager_.get();
+#else
+ NOTIMPLEMENTED();
+ return NULL;
#endif
}
@@ -713,7 +713,7 @@ void BrowserProcessImpl::CreateLocalState() {
pref_change_registrar_.Init(local_state_.get());
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
print_job_manager_->InitOnUIThread(local_state_.get());
#endif
@@ -831,17 +831,21 @@ void BrowserProcessImpl::CreateStatusTray() {
}
void BrowserProcessImpl::CreatePrintPreviewTabController() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(print_preview_tab_controller_.get() == NULL);
print_preview_tab_controller_ = new printing::PrintPreviewTabController();
+#else
+ NOTIMPLEMENTED();
#endif
}
void BrowserProcessImpl::CreateBackgroundPrintingManager() {
+#if defined(ENABLE_PRINTING)
DCHECK(background_printing_manager_.get() == NULL);
background_printing_manager_.reset(new printing::BackgroundPrintingManager());
+#else
+ NOTIMPLEMENTED();
+#endif
}
void BrowserProcessImpl::CreateSafeBrowsingService() {
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698