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

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

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a RenderWidgetWindowTreeeClientFactory in tests Created 5 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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/leak_annotations.h" 8 #include "base/debug/leak_annotations.h"
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #endif 51 #endif
52 52
53 #if defined(ENABLE_WEBRTC) 53 #if defined(ENABLE_WEBRTC)
54 #include "third_party/libjingle/overrides/init_webrtc.h" 54 #include "third_party/libjingle/overrides/init_webrtc.h"
55 #endif 55 #endif
56 56
57 #if defined(USE_OZONE) 57 #if defined(USE_OZONE)
58 #include "ui/ozone/public/client_native_pixmap_factory.h" 58 #include "ui/ozone/public/client_native_pixmap_factory.h"
59 #endif 59 #endif
60 60
61 #if defined(MOJO_SHELL_CLIENT)
62 #include "content/common/mojo/mojo_shell_connection_impl.h"
63 #endif
64
61 namespace content { 65 namespace content {
62 namespace { 66 namespace {
63 // This function provides some ways to test crash and assertion handling 67 // This function provides some ways to test crash and assertion handling
64 // behavior of the renderer. 68 // behavior of the renderer.
65 static void HandleRendererErrorTestParameters( 69 static void HandleRendererErrorTestParameters(
66 const base::CommandLine& command_line) { 70 const base::CommandLine& command_line) {
67 if (command_line.HasSwitch(switches::kWaitForDebugger)) 71 if (command_line.HasSwitch(switches::kWaitForDebugger))
68 base::debug::WaitForDebugger(60, true); 72 base::debug::WaitForDebugger(60, true);
69 73
70 if (command_line.HasSwitch(switches::kRendererStartupDialog)) 74 if (command_line.HasSwitch(switches::kRendererStartupDialog))
(...skipping 12 matching lines...) Expand all
83 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't 87 // Don't use the TRACE_EVENT0 macro because the tracing infrastructure doesn't
84 // expect synchronous events around the main loop of a thread. 88 // expect synchronous events around the main loop of a thread.
85 TRACE_EVENT_ASYNC_BEGIN0("startup", "RendererMain", 0); 89 TRACE_EVENT_ASYNC_BEGIN0("startup", "RendererMain", 0);
86 90
87 const base::TimeTicks renderer_main_entry_time = base::TimeTicks::Now(); 91 const base::TimeTicks renderer_main_entry_time = base::TimeTicks::Now();
88 92
89 base::trace_event::TraceLog::GetInstance()->SetProcessName("Renderer"); 93 base::trace_event::TraceLog::GetInstance()->SetProcessName("Renderer");
90 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( 94 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
91 kTraceEventRendererProcessSortIndex); 95 kTraceEventRendererProcessSortIndex);
92 96
97 #if defined(MOJO_SHELL_CLIENT)
98 MojoShellConnectionImpl::Create();
99 #endif
100
93 const base::CommandLine& parsed_command_line = parameters.command_line; 101 const base::CommandLine& parsed_command_line = parameters.command_line;
94 102
95 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
96 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool; 104 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
97 #endif // OS_MACOSX 105 #endif // OS_MACOSX
98 106
99 #if defined(OS_CHROMEOS) 107 #if defined(OS_CHROMEOS)
100 // As Zygote process starts up earlier than browser process gets its own 108 // As Zygote process starts up earlier than browser process gets its own
101 // locale (at login time for Chrome OS), we have to set the ICU default 109 // locale (at login time for Chrome OS), we have to set the ICU default
102 // locale for renderer process here. 110 // locale for renderer process here.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // ignore shutdown-only leaks. 232 // ignore shutdown-only leaks.
225 __lsan_do_leak_check(); 233 __lsan_do_leak_check();
226 #endif 234 #endif
227 } 235 }
228 platform.PlatformUninitialize(); 236 platform.PlatformUninitialize();
229 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); 237 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0);
230 return 0; 238 return 0;
231 } 239 }
232 240
233 } // namespace content 241 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698