| 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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #include "content/public/browser/context_factory.h" | 81 #include "content/public/browser/context_factory.h" |
| 82 #include "ui/aura/env.h" | 82 #include "ui/aura/env.h" |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 #if !defined(OS_IOS) | 85 #if !defined(OS_IOS) |
| 86 #include "content/browser/renderer_host/render_process_host_impl.h" | 86 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 #if defined(OS_ANDROID) | 89 #if defined(OS_ANDROID) |
| 90 #include "base/android/jni_android.h" | 90 #include "base/android/jni_android.h" |
| 91 #include "components/tracing/graphics_memory_dump_provider_android.h" |
| 91 #include "content/browser/android/browser_startup_controller.h" | 92 #include "content/browser/android/browser_startup_controller.h" |
| 92 #include "content/browser/android/browser_surface_texture_manager.h" | 93 #include "content/browser/android/browser_surface_texture_manager.h" |
| 93 #include "content/browser/android/in_process_surface_texture_manager.h" | 94 #include "content/browser/android/in_process_surface_texture_manager.h" |
| 94 #include "content/browser/android/tracing_controller_android.h" | 95 #include "content/browser/android/tracing_controller_android.h" |
| 95 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 96 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
| 96 #include "content/public/browser/screen_orientation_provider.h" | 97 #include "content/public/browser/screen_orientation_provider.h" |
| 97 #include "ui/gl/gl_surface.h" | 98 #include "ui/gl/gl_surface.h" |
| 98 #endif | 99 #endif |
| 99 | 100 |
| 100 #if defined(OS_MACOSX) | 101 #if defined(OS_MACOSX) |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 int BrowserMainLoop::BrowserThreadsStarted() { | 1148 int BrowserMainLoop::BrowserThreadsStarted() { |
| 1148 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1149 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
| 1149 | 1150 |
| 1150 #if !defined(OS_IOS) | 1151 #if !defined(OS_IOS) |
| 1151 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1152 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
| 1152 indexed_db_thread_->Start(); | 1153 indexed_db_thread_->Start(); |
| 1153 #endif | 1154 #endif |
| 1154 | 1155 |
| 1155 #if !defined(OS_IOS) | 1156 #if !defined(OS_IOS) |
| 1156 HistogramSynchronizer::GetInstance(); | 1157 HistogramSynchronizer::GetInstance(); |
| 1157 | |
| 1158 #if defined(OS_ANDROID) | 1158 #if defined(OS_ANDROID) |
| 1159 // Up the priority of the UI thread. | 1159 // Up the priority of the UI thread. |
| 1160 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 1160 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
| 1161 #endif | 1161 #endif |
| 1162 | 1162 |
| 1163 bool always_uses_gpu = true; | 1163 bool always_uses_gpu = true; |
| 1164 bool established_gpu_channel = false; | 1164 bool established_gpu_channel = false; |
| 1165 #if defined(OS_ANDROID) | 1165 #if defined(OS_ANDROID) |
| 1166 // TODO(crbug.com/439322): This should be set to |true|. | 1166 // TODO(crbug.com/439322): This should be set to |true|. |
| 1167 established_gpu_channel = false; | 1167 established_gpu_channel = false; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1179 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); | 1179 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); |
| 1180 } | 1180 } |
| 1181 #endif // defined(USE_AURA) | 1181 #endif // defined(USE_AURA) |
| 1182 #endif // defined(OS_ANDROID) | 1182 #endif // defined(OS_ANDROID) |
| 1183 | 1183 |
| 1184 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that | 1184 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that |
| 1185 // unregistration happens on the IO thread (See | 1185 // unregistration happens on the IO thread (See |
| 1186 // BrowserProcessSubThread::IOThreadPreCleanUp). | 1186 // BrowserProcessSubThread::IOThreadPreCleanUp). |
| 1187 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1187 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1188 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); | 1188 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); |
| 1189 #if defined(OS_ANDROID) |
| 1190 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1191 tracing::GraphicsMemoryDumpProvider::GetInstance()); |
| 1192 #endif |
| 1189 | 1193 |
| 1190 { | 1194 { |
| 1191 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); | 1195 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); |
| 1192 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( | 1196 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( |
| 1193 MediaInternals::GetInstance(), io_thread_->task_runner())); | 1197 MediaInternals::GetInstance(), io_thread_->task_runner())); |
| 1194 } | 1198 } |
| 1195 | 1199 |
| 1196 { | 1200 { |
| 1197 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); | 1201 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); |
| 1198 midi_manager_.reset(media::midi::MidiManager::Create()); | 1202 midi_manager_.reset(media::midi::MidiManager::Create()); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 DCHECK(is_tracing_startup_for_duration_); | 1412 DCHECK(is_tracing_startup_for_duration_); |
| 1409 | 1413 |
| 1410 is_tracing_startup_for_duration_ = false; | 1414 is_tracing_startup_for_duration_ = false; |
| 1411 TracingController::GetInstance()->DisableRecording( | 1415 TracingController::GetInstance()->DisableRecording( |
| 1412 TracingController::CreateFileSink( | 1416 TracingController::CreateFileSink( |
| 1413 startup_trace_file_, | 1417 startup_trace_file_, |
| 1414 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1418 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1415 } | 1419 } |
| 1416 | 1420 |
| 1417 } // namespace content | 1421 } // namespace content |
| OLD | NEW |