OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 #endif | 173 #endif |
174 | 174 |
175 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) | 175 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) |
176 #include "crypto/nss_util.h" | 176 #include "crypto/nss_util.h" |
177 #endif | 177 #endif |
178 | 178 |
179 #if defined(MOJO_SHELL_CLIENT) | 179 #if defined(MOJO_SHELL_CLIENT) |
180 #include "content/common/mojo/mojo_shell_connection_impl.h" | 180 #include "content/common/mojo/mojo_shell_connection_impl.h" |
181 #include "mojo/converters/network/network_type_converters.h" | 181 #include "mojo/converters/network/network_type_converters.h" |
182 #include "mojo/shell/public/cpp/shell.h" | 182 #include "mojo/shell/public/cpp/shell.h" |
183 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" | |
184 #include "ui/views/mus/window_manager_connection.h" | 183 #include "ui/views/mus/window_manager_connection.h" |
185 #endif | 184 #endif |
186 | 185 |
187 // One of the linux specific headers defines this as a macro. | 186 // One of the linux specific headers defines this as a macro. |
188 #ifdef DestroyAll | 187 #ifdef DestroyAll |
189 #undef DestroyAll | 188 #undef DestroyAll |
190 #endif | 189 #endif |
191 | 190 |
192 namespace content { | 191 namespace content { |
193 namespace { | 192 namespace { |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 | 908 |
910 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); | 909 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); |
911 } | 910 } |
912 created_threads_ = true; | 911 created_threads_ = true; |
913 return result_code_; | 912 return result_code_; |
914 } | 913 } |
915 | 914 |
916 int BrowserMainLoop::PreMainMessageLoopRun() { | 915 int BrowserMainLoop::PreMainMessageLoopRun() { |
917 #if defined(MOJO_SHELL_CLIENT) | 916 #if defined(MOJO_SHELL_CLIENT) |
918 if (IsRunningInMojoShell()) { | 917 if (IsRunningInMojoShell()) { |
919 mojo::embedder::PreInitializeChildProcess(); | |
920 MojoShellConnectionImpl::Create(); | 918 MojoShellConnectionImpl::Create(); |
921 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); | 919 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); |
922 #if defined(USE_AURA) | 920 #if defined(USE_AURA) |
923 views::WindowManagerConnection::Create( | 921 views::WindowManagerConnection::Create( |
924 MojoShellConnection::Get()->GetShell()); | 922 MojoShellConnection::Get()->GetShell()); |
925 #endif | 923 #endif |
926 } | 924 } |
927 #endif | 925 #endif |
928 | 926 |
929 if (parts_) { | 927 if (parts_) { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 DCHECK(is_tracing_startup_for_duration_); | 1460 DCHECK(is_tracing_startup_for_duration_); |
1463 | 1461 |
1464 is_tracing_startup_for_duration_ = false; | 1462 is_tracing_startup_for_duration_ = false; |
1465 TracingController::GetInstance()->StopTracing( | 1463 TracingController::GetInstance()->StopTracing( |
1466 TracingController::CreateFileSink( | 1464 TracingController::CreateFileSink( |
1467 startup_trace_file_, | 1465 startup_trace_file_, |
1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1466 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1469 } | 1467 } |
1470 | 1468 |
1471 } // namespace content | 1469 } // namespace content |
OLD | NEW |