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

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

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 <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"
11 #include "base/debug/leak_annotations.h" 11 #include "base/debug/leak_annotations.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
15 #include "base/metrics/statistics_recorder.h" 15 #include "base/metrics/statistics_recorder.h"
16 #include "base/pending_task.h" 16 #include "base/pending_task.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "base/sys_info.h" 19 #include "base/sys_info.h"
20 #include "base/threading/platform_thread.h" 20 #include "base/threading/platform_thread.h"
21 #include "base/timer/hi_res_timer_manager.h" 21 #include "base/timer/hi_res_timer_manager.h"
22 #include "base/trace_event/trace_event.h" 22 #include "base/trace_event/trace_event.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "components/scheduler/renderer/renderer_scheduler.h"
25 #include "content/child/child_process.h" 24 #include "content/child/child_process.h"
26 #include "content/common/content_constants_internal.h" 25 #include "content/common/content_constants_internal.h"
27 #include "content/common/mojo/mojo_shell_connection_impl.h" 26 #include "content/common/mojo/mojo_shell_connection_impl.h"
28 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
29 #include "content/public/common/main_function_params.h" 28 #include "content/public/common/main_function_params.h"
30 #include "content/public/renderer/content_renderer_client.h" 29 #include "content/public/renderer/content_renderer_client.h"
31 #include "content/renderer/render_process_impl.h" 30 #include "content/renderer/render_process_impl.h"
32 #include "content/renderer/render_thread_impl.h" 31 #include "content/renderer/render_thread_impl.h"
33 #include "content/renderer/renderer_main_platform_delegate.h" 32 #include "content/renderer/renderer_main_platform_delegate.h"
33 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
34 #include "third_party/skia/include/core/SkGraphics.h" 34 #include "third_party/skia/include/core/SkGraphics.h"
35 #include "ui/base/ui_base_switches.h" 35 #include "ui/base/ui_base_switches.h"
36 36
37 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
38 #include "base/android/library_loader/library_loader_hooks.h" 38 #include "base/android/library_loader/library_loader_hooks.h"
39 #endif // OS_ANDROID 39 #endif // OS_ANDROID
40 40
41 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
42 #include <Carbon/Carbon.h> 42 #include <Carbon/Carbon.h>
43 #include <signal.h> 43 #include <signal.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); 145 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
146 146
147 // Initialize histogram statistics gathering system. 147 // Initialize histogram statistics gathering system.
148 base::StatisticsRecorder::Initialize(); 148 base::StatisticsRecorder::Initialize();
149 149
150 #if defined(OS_ANDROID) 150 #if defined(OS_ANDROID)
151 // If we have any pending LibraryLoader histograms, record them. 151 // If we have any pending LibraryLoader histograms, record them.
152 base::android::RecordLibraryLoaderRendererHistograms(); 152 base::android::RecordLibraryLoaderRendererHistograms();
153 #endif 153 #endif
154 154
155 std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler( 155 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler(
156 scheduler::RendererScheduler::Create()); 156 blink::scheduler::RendererScheduler::Create());
157 157
158 // PlatformInitialize uses FieldTrials, so this must happen later. 158 // PlatformInitialize uses FieldTrials, so this must happen later.
159 platform.PlatformInitialize(); 159 platform.PlatformInitialize();
160 160
161 #if defined(ENABLE_PLUGINS) 161 #if defined(ENABLE_PLUGINS)
162 // Load pepper plugins before engaging the sandbox. 162 // Load pepper plugins before engaging the sandbox.
163 PepperPluginRegistry::GetInstance(); 163 PepperPluginRegistry::GetInstance();
164 #endif 164 #endif
165 #if defined(ENABLE_WEBRTC) 165 #if defined(ENABLE_WEBRTC)
166 // Initialize WebRTC before engaging the sandbox. 166 // Initialize WebRTC before engaging the sandbox.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // ignore shutdown-only leaks. 204 // ignore shutdown-only leaks.
205 __lsan_do_leak_check(); 205 __lsan_do_leak_check();
206 #endif 206 #endif
207 } 207 }
208 platform.PlatformUninitialize(); 208 platform.PlatformUninitialize();
209 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); 209 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0);
210 return 0; 210 return 0;
211 } 211 }
212 212
213 } // namespace content 213 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | content/renderer/scheduler/resource_dispatch_throttler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698