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