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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years 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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 12 matching lines...) Expand all
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "content/child/child_process.h" 24 #include "content/child/child_process.h"
25 #include "content/common/content_constants_internal.h" 25 #include "content/common/content_constants_internal.h"
26 #include "content/common/service_manager/service_manager_connection_impl.h" 26 #include "content/common/service_manager/service_manager_connection_impl.h"
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "content/public/common/main_function_params.h" 28 #include "content/public/common/main_function_params.h"
29 #include "content/public/renderer/content_renderer_client.h" 29 #include "content/public/renderer/content_renderer_client.h"
30 #include "content/renderer/render_process_impl.h" 30 #include "content/renderer/render_process_impl.h"
31 #include "content/renderer/render_thread_impl.h" 31 #include "content/renderer/render_thread_impl.h"
32 #include "content/renderer/renderer_main_platform_delegate.h" 32 #include "content/renderer/renderer_main_platform_delegate.h"
33 #include "media/media_features.h"
33 #include "ppapi/features/features.h" 34 #include "ppapi/features/features.h"
34 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" 35 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
35 #include "third_party/skia/include/core/SkGraphics.h" 36 #include "third_party/skia/include/core/SkGraphics.h"
36 #include "ui/base/ui_base_switches.h" 37 #include "ui/base/ui_base_switches.h"
37 38
38 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
39 #include "base/android/library_loader/library_loader_hooks.h" 40 #include "base/android/library_loader/library_loader_hooks.h"
40 #endif // OS_ANDROID 41 #endif // OS_ANDROID
41 42
42 #if defined(OS_MACOSX) 43 #if defined(OS_MACOSX)
43 #include <Carbon/Carbon.h> 44 #include <Carbon/Carbon.h>
44 #include <signal.h> 45 #include <signal.h>
45 #include <unistd.h> 46 #include <unistd.h>
46 47
47 #include "base/mac/scoped_nsautorelease_pool.h" 48 #include "base/mac/scoped_nsautorelease_pool.h"
48 #include "base/message_loop/message_pump_mac.h" 49 #include "base/message_loop/message_pump_mac.h"
49 #include "third_party/WebKit/public/web/WebView.h" 50 #include "third_party/WebKit/public/web/WebView.h"
50 #endif // OS_MACOSX 51 #endif // OS_MACOSX
51 52
52 #if BUILDFLAG(ENABLE_PLUGINS) 53 #if BUILDFLAG(ENABLE_PLUGINS)
53 #include "content/renderer/pepper/pepper_plugin_registry.h" 54 #include "content/renderer/pepper/pepper_plugin_registry.h"
54 #endif 55 #endif
55 56
56 #if defined(ENABLE_WEBRTC) 57 #if BUILDFLAG(ENABLE_WEBRTC)
57 #include "third_party/webrtc_overrides/init_webrtc.h" 58 #include "third_party/webrtc_overrides/init_webrtc.h"
58 #endif 59 #endif
59 60
60 #if defined(USE_OZONE) 61 #if defined(USE_OZONE)
61 #include "ui/ozone/public/client_native_pixmap_factory.h" 62 #include "ui/ozone/public/client_native_pixmap_factory.h"
62 #endif 63 #endif
63 64
64 namespace content { 65 namespace content {
65 namespace { 66 namespace {
66 // This function provides some ways to test crash and assertion handling 67 // This function provides some ways to test crash and assertion handling
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler( 157 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler(
157 blink::scheduler::RendererScheduler::Create()); 158 blink::scheduler::RendererScheduler::Create());
158 159
159 // PlatformInitialize uses FieldTrials, so this must happen later. 160 // PlatformInitialize uses FieldTrials, so this must happen later.
160 platform.PlatformInitialize(); 161 platform.PlatformInitialize();
161 162
162 #if BUILDFLAG(ENABLE_PLUGINS) 163 #if BUILDFLAG(ENABLE_PLUGINS)
163 // Load pepper plugins before engaging the sandbox. 164 // Load pepper plugins before engaging the sandbox.
164 PepperPluginRegistry::GetInstance(); 165 PepperPluginRegistry::GetInstance();
165 #endif 166 #endif
166 #if defined(ENABLE_WEBRTC) 167 #if BUILDFLAG(ENABLE_WEBRTC)
167 // Initialize WebRTC before engaging the sandbox. 168 // Initialize WebRTC before engaging the sandbox.
168 // NOTE: On linux, this call could already have been made from 169 // NOTE: On linux, this call could already have been made from
169 // zygote_main_linux.cc. However, calling multiple times from the same thread 170 // zygote_main_linux.cc. However, calling multiple times from the same thread
170 // is OK. 171 // is OK.
171 InitializeWebRtcModule(); 172 InitializeWebRtcModule();
172 #endif 173 #endif
173 174
174 { 175 {
175 #if defined(OS_WIN) || defined(OS_MACOSX) 176 #if defined(OS_WIN) || defined(OS_MACOSX)
176 // TODO(markus): Check if it is OK to unconditionally move this 177 // TODO(markus): Check if it is OK to unconditionally move this
(...skipping 28 matching lines...) Expand all
205 // ignore shutdown-only leaks. 206 // ignore shutdown-only leaks.
206 __lsan_do_leak_check(); 207 __lsan_do_leak_check();
207 #endif 208 #endif
208 } 209 }
209 platform.PlatformUninitialize(); 210 platform.PlatformUninitialize();
210 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); 211 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0);
211 return 0; 212 return 0;
212 } 213 }
213 214
214 } // namespace content 215 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | content/renderer/speech_recognition_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698