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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 | 910 |
912 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); | 911 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); |
913 } | 912 } |
914 created_threads_ = true; | 913 created_threads_ = true; |
915 return result_code_; | 914 return result_code_; |
916 } | 915 } |
917 | 916 |
918 int BrowserMainLoop::PreMainMessageLoopRun() { | 917 int BrowserMainLoop::PreMainMessageLoopRun() { |
919 #if defined(MOJO_SHELL_CLIENT) | 918 #if defined(MOJO_SHELL_CLIENT) |
920 if (IsRunningInMojoShell()) { | 919 if (IsRunningInMojoShell()) { |
921 mojo::embedder::PreInitializeChildProcess(); | |
922 MojoShellConnectionImpl::Create(); | 920 MojoShellConnectionImpl::Create(); |
923 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); | 921 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); |
924 #if defined(USE_AURA) | 922 #if defined(USE_AURA) |
925 views::WindowManagerConnection::Create( | 923 views::WindowManagerConnection::Create( |
926 MojoShellConnection::Get()->GetShell()); | 924 MojoShellConnection::Get()->GetShell()); |
927 #endif | 925 #endif |
928 } | 926 } |
929 #endif | 927 #endif |
930 | 928 |
931 if (parts_) { | 929 if (parts_) { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 DCHECK(is_tracing_startup_for_duration_); | 1462 DCHECK(is_tracing_startup_for_duration_); |
1465 | 1463 |
1466 is_tracing_startup_for_duration_ = false; | 1464 is_tracing_startup_for_duration_ = false; |
1467 TracingController::GetInstance()->StopTracing( | 1465 TracingController::GetInstance()->StopTracing( |
1468 TracingController::CreateFileSink( | 1466 TracingController::CreateFileSink( |
1469 startup_trace_file_, | 1467 startup_trace_file_, |
1470 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1471 } | 1469 } |
1472 | 1470 |
1473 } // namespace content | 1471 } // namespace content |
OLD | NEW |