| 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 | 907 |
| 908 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); | 908 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); |
| 909 } | 909 } |
| 910 created_threads_ = true; | 910 created_threads_ = true; |
| 911 return result_code_; | 911 return result_code_; |
| 912 } | 912 } |
| 913 | 913 |
| 914 int BrowserMainLoop::PreMainMessageLoopRun() { | 914 int BrowserMainLoop::PreMainMessageLoopRun() { |
| 915 if (IsRunningInMojoShell()) { | 915 if (IsRunningInMojoShell()) { |
| 916 MojoShellConnectionImpl::Create(); | 916 MojoShellConnectionImpl::Create(); |
| 917 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); | 917 MojoShellConnectionImpl::Get()->Connect(nullptr); |
| 918 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 918 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
| 919 views::WindowManagerConnection::Create( | 919 if (MojoShellConnection::Get()) { |
| 920 MojoShellConnection::Get()->GetConnector()); | 920 views::WindowManagerConnection::Create( |
| 921 MojoShellConnection::Get()->GetConnector()); |
| 922 } |
| 921 #endif | 923 #endif |
| 922 } | 924 } |
| 923 | 925 |
| 924 if (parts_) { | 926 if (parts_) { |
| 925 TRACE_EVENT0("startup", | 927 TRACE_EVENT0("startup", |
| 926 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun"); | 928 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun"); |
| 927 TRACK_SCOPED_REGION( | 929 TRACK_SCOPED_REGION( |
| 928 "Startup", "BrowserMainLoop::PreMainMessageLoopRun"); | 930 "Startup", "BrowserMainLoop::PreMainMessageLoopRun"); |
| 929 | 931 |
| 930 parts_->PreMainMessageLoopRun(); | 932 parts_->PreMainMessageLoopRun(); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 DCHECK(is_tracing_startup_for_duration_); | 1468 DCHECK(is_tracing_startup_for_duration_); |
| 1467 | 1469 |
| 1468 is_tracing_startup_for_duration_ = false; | 1470 is_tracing_startup_for_duration_ = false; |
| 1469 TracingController::GetInstance()->StopTracing( | 1471 TracingController::GetInstance()->StopTracing( |
| 1470 TracingController::CreateFileSink( | 1472 TracingController::CreateFileSink( |
| 1471 startup_trace_file_, | 1473 startup_trace_file_, |
| 1472 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1474 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1473 } | 1475 } |
| 1474 | 1476 |
| 1475 } // namespace content | 1477 } // namespace content |
| OLD | NEW |