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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 | 1063 |
1064 if (parts_) | 1064 if (parts_) |
1065 parts_->ToolkitInitialized(); | 1065 parts_->ToolkitInitialized(); |
1066 } | 1066 } |
1067 | 1067 |
1068 void BrowserMainLoop::MainMessageLoopRun() { | 1068 void BrowserMainLoop::MainMessageLoopRun() { |
1069 #if defined(OS_ANDROID) | 1069 #if defined(OS_ANDROID) |
1070 // Android's main message loop is the Java message loop. | 1070 // Android's main message loop is the Java message loop. |
1071 NOTREACHED(); | 1071 NOTREACHED(); |
1072 #else | 1072 #else |
1073 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); | 1073 DCHECK(base::MessageLoopForUI::IsCurrent()); |
1074 if (parameters_.ui_task) | 1074 if (parameters_.ui_task) |
1075 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 1075 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
1076 *parameters_.ui_task); | 1076 *parameters_.ui_task); |
1077 | 1077 |
1078 base::RunLoop run_loop; | 1078 base::RunLoop run_loop; |
1079 run_loop.Run(); | 1079 run_loop.Run(); |
1080 #endif | 1080 #endif |
1081 } | 1081 } |
1082 | 1082 |
1083 void BrowserMainLoop::InitStartupTracing(const CommandLine& command_line) { | 1083 void BrowserMainLoop::InitStartupTracing(const CommandLine& command_line) { |
(...skipping 28 matching lines...) Expand all Loading... |
1112 base::TimeDelta::FromSeconds(delay_secs)); | 1112 base::TimeDelta::FromSeconds(delay_secs)); |
1113 } | 1113 } |
1114 | 1114 |
1115 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { | 1115 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { |
1116 is_tracing_startup_ = false; | 1116 is_tracing_startup_ = false; |
1117 TracingController::GetInstance()->DisableRecording( | 1117 TracingController::GetInstance()->DisableRecording( |
1118 trace_file, TracingController::TracingFileResultCallback()); | 1118 trace_file, TracingController::TracingFileResultCallback()); |
1119 } | 1119 } |
1120 | 1120 |
1121 } // namespace content | 1121 } // namespace content |
OLD | NEW |