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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 525513003: Cleanup: Put more plugin code behind the ENABLE_PLUGINS ifdef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 19 matching lines...) Expand all
30 #include "content/browser/gamepad/gamepad_service.h" 30 #include "content/browser/gamepad/gamepad_service.h"
31 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 31 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
32 #include "content/browser/gpu/compositor_util.h" 32 #include "content/browser/gpu/compositor_util.h"
33 #include "content/browser/gpu/gpu_data_manager_impl.h" 33 #include "content/browser/gpu/gpu_data_manager_impl.h"
34 #include "content/browser/gpu/gpu_process_host.h" 34 #include "content/browser/gpu/gpu_process_host.h"
35 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 35 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
36 #include "content/browser/histogram_synchronizer.h" 36 #include "content/browser/histogram_synchronizer.h"
37 #include "content/browser/loader/resource_dispatcher_host_impl.h" 37 #include "content/browser/loader/resource_dispatcher_host_impl.h"
38 #include "content/browser/media/media_internals.h" 38 #include "content/browser/media/media_internals.h"
39 #include "content/browser/net/browser_online_state_observer.h" 39 #include "content/browser/net/browser_online_state_observer.h"
40 #include "content/browser/plugin_service_impl.h"
41 #include "content/browser/renderer_host/media/media_stream_manager.h" 40 #include "content/browser/renderer_host/media/media_stream_manager.h"
42 #include "content/browser/speech/speech_recognition_manager_impl.h" 41 #include "content/browser/speech/speech_recognition_manager_impl.h"
43 #include "content/browser/startup_task_runner.h" 42 #include "content/browser/startup_task_runner.h"
44 #include "content/browser/time_zone_monitor.h" 43 #include "content/browser/time_zone_monitor.h"
45 #include "content/browser/webui/content_web_ui_controller_factory.h" 44 #include "content/browser/webui/content_web_ui_controller_factory.h"
46 #include "content/browser/webui/url_data_manager.h" 45 #include "content/browser/webui/url_data_manager.h"
47 #include "content/public/browser/browser_main_parts.h" 46 #include "content/public/browser/browser_main_parts.h"
48 #include "content/public/browser/browser_shutdown.h" 47 #include "content/public/browser/browser_shutdown.h"
49 #include "content/public/browser/content_browser_client.h" 48 #include "content/public/browser/content_browser_client.h"
50 #include "content/public/browser/render_process_host.h" 49 #include "content/public/browser/render_process_host.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #elif defined(OS_MACOSX) && !defined(OS_IOS) 108 #elif defined(OS_MACOSX) && !defined(OS_IOS)
110 #include "content/browser/device_monitor_mac.h" 109 #include "content/browser/device_monitor_mac.h"
111 #endif 110 #endif
112 111
113 #if defined(OS_POSIX) && !defined(OS_MACOSX) 112 #if defined(OS_POSIX) && !defined(OS_MACOSX)
114 #include "content/browser/renderer_host/render_sandbox_host_linux.h" 113 #include "content/browser/renderer_host/render_sandbox_host_linux.h"
115 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 114 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
116 #include "sandbox/linux/suid/client/setuid_sandbox_client.h" 115 #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
117 #endif 116 #endif
118 117
118 #if defined(ENABLE_PLUGINS)
119 #include "content/browser/plugin_service_impl.h"
120 #endif
121
119 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) 122 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
120 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" 123 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
121 #endif 124 #endif
122 125
123 #if defined(USE_X11) 126 #if defined(USE_X11)
124 #include "ui/gfx/x/x11_connection.h" 127 #include "ui/gfx/x/x11_connection.h"
125 #include "ui/gfx/x/x11_types.h" 128 #include "ui/gfx/x/x11_types.h"
126 #endif 129 #endif
127 130
128 // One of the linux specific headers defines this as a macro. 131 // One of the linux specific headers defines this as a macro.
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 #if defined(USE_AURA) || defined(OS_MACOSX) 999 #if defined(USE_AURA) || defined(OS_MACOSX)
997 if (ShouldInitializeBrowserGpuChannelAndTransportSurface()) { 1000 if (ShouldInitializeBrowserGpuChannelAndTransportSurface()) {
998 established_gpu_channel = true; 1001 established_gpu_channel = true;
999 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { 1002 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) {
1000 established_gpu_channel = always_uses_gpu = false; 1003 established_gpu_channel = always_uses_gpu = false;
1001 } 1004 }
1002 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1005 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1003 ImageTransportFactory::Initialize(); 1006 ImageTransportFactory::Initialize();
1004 #if defined(USE_AURA) 1007 #if defined(USE_AURA)
1005 if (aura::Env::GetInstance()) { 1008 if (aura::Env::GetInstance()) {
1006 aura::Env::GetInstance()->set_context_factory( 1009 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1007 content::GetContextFactory());
1008 } 1010 }
1009 #endif 1011 #endif
1010 } 1012 }
1011 #elif defined(OS_ANDROID) 1013 #elif defined(OS_ANDROID)
1012 established_gpu_channel = true; 1014 established_gpu_channel = true;
1013 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1015 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1014 #endif 1016 #endif
1015 1017
1016 #if defined(OS_LINUX) && defined(USE_UDEV) 1018 #if defined(OS_LINUX) && defined(USE_UDEV)
1017 device_monitor_linux_.reset(new DeviceMonitorLinux()); 1019 device_monitor_linux_.reset(new DeviceMonitorLinux());
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 &BrowserMainLoop::EndStartupTracing); 1194 &BrowserMainLoop::EndStartupTracing);
1193 } 1195 }
1194 1196
1195 void BrowserMainLoop::EndStartupTracing() { 1197 void BrowserMainLoop::EndStartupTracing() {
1196 is_tracing_startup_ = false; 1198 is_tracing_startup_ = false;
1197 TracingController::GetInstance()->DisableRecording( 1199 TracingController::GetInstance()->DisableRecording(
1198 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); 1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing));
1199 } 1201 }
1200 1202
1201 } // namespace content 1203 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698