Chromium Code Reviews| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 #include "content/public/browser/context_factory.h" | 80 #include "content/public/browser/context_factory.h" |
| 81 #include "ui/aura/env.h" | 81 #include "ui/aura/env.h" |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 #if !defined(OS_IOS) | 84 #if !defined(OS_IOS) |
| 85 #include "content/browser/renderer_host/render_process_host_impl.h" | 85 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 #if defined(OS_ANDROID) | 88 #if defined(OS_ANDROID) |
| 89 #include "base/android/jni_android.h" | 89 #include "base/android/jni_android.h" |
| 90 #include "components/tracing/graphics_memory_dump_provider_android.h" | |
| 90 #include "content/browser/android/browser_startup_controller.h" | 91 #include "content/browser/android/browser_startup_controller.h" |
| 91 #include "content/browser/android/browser_surface_texture_manager.h" | 92 #include "content/browser/android/browser_surface_texture_manager.h" |
| 92 #include "content/browser/android/in_process_surface_texture_manager.h" | 93 #include "content/browser/android/in_process_surface_texture_manager.h" |
| 93 #include "content/browser/android/tracing_controller_android.h" | 94 #include "content/browser/android/tracing_controller_android.h" |
| 94 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" | 95 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" |
| 95 #include "content/public/browser/screen_orientation_provider.h" | 96 #include "content/public/browser/screen_orientation_provider.h" |
| 96 #include "ui/gl/gl_surface.h" | 97 #include "ui/gl/gl_surface.h" |
| 97 #endif | 98 #endif |
| 98 | 99 |
| 99 #if defined(OS_MACOSX) | 100 #if defined(OS_MACOSX) |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1134 int BrowserMainLoop::BrowserThreadsStarted() { | 1135 int BrowserMainLoop::BrowserThreadsStarted() { |
| 1135 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1136 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
| 1136 | 1137 |
| 1137 #if !defined(OS_IOS) | 1138 #if !defined(OS_IOS) |
| 1138 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1139 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
| 1139 indexed_db_thread_->Start(); | 1140 indexed_db_thread_->Start(); |
| 1140 #endif | 1141 #endif |
| 1141 | 1142 |
| 1142 #if !defined(OS_IOS) | 1143 #if !defined(OS_IOS) |
| 1143 HistogramSynchronizer::GetInstance(); | 1144 HistogramSynchronizer::GetInstance(); |
| 1144 | |
| 1145 #if defined(OS_ANDROID) | 1145 #if defined(OS_ANDROID) |
| 1146 // Up the priority of the UI thread. | 1146 // Up the priority of the UI thread. |
| 1147 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 1147 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
| 1148 #endif | 1148 #endif |
| 1149 | 1149 |
| 1150 bool always_uses_gpu = true; | 1150 bool always_uses_gpu = true; |
| 1151 bool established_gpu_channel = false; | 1151 bool established_gpu_channel = false; |
| 1152 #if defined(OS_ANDROID) | 1152 #if defined(OS_ANDROID) |
| 1153 // TODO(crbug.com/439322): This should be set to |true|. | 1153 // TODO(crbug.com/439322): This should be set to |true|. |
| 1154 established_gpu_channel = false; | 1154 established_gpu_channel = false; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 1166 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); | 1166 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); |
| 1167 } | 1167 } |
| 1168 #endif // defined(USE_AURA) | 1168 #endif // defined(USE_AURA) |
| 1169 #endif // defined(OS_ANDROID) | 1169 #endif // defined(OS_ANDROID) |
| 1170 | 1170 |
| 1171 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that | 1171 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that |
| 1172 // unregistration happens on the IO thread (See | 1172 // unregistration happens on the IO thread (See |
| 1173 // BrowserProcessSubThread::IOThreadPreCleanUp). | 1173 // BrowserProcessSubThread::IOThreadPreCleanUp). |
| 1174 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1174 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1175 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); | 1175 BrowserGpuMemoryBufferManager::current(), io_thread_->task_runner()); |
| 1176 #if defined(OS_ANDROID) | |
| 1177 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | |
|
ericrk
2015/10/02 18:30:11
Do we need to register this in both Browser and GP
Primiano Tucci (use gerrit)
2015/10/05 14:24:25
In the standard (non-in-proc) case I see that both
ericrk
2015/10/05 20:32:21
That's what I was thinking, but now that I think o
| |
| 1178 tracing::GraphicsMemoryDumpProvider::GetInstance()); | |
| 1179 #endif | |
| 1176 | 1180 |
| 1177 { | 1181 { |
| 1178 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); | 1182 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:AudioMan"); |
| 1179 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( | 1183 audio_manager_.reset(media::AudioManager::CreateWithHangTimer( |
| 1180 MediaInternals::GetInstance(), io_thread_->task_runner())); | 1184 MediaInternals::GetInstance(), io_thread_->task_runner())); |
| 1181 } | 1185 } |
| 1182 | 1186 |
| 1183 { | 1187 { |
| 1184 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); | 1188 TRACE_EVENT0("startup", "BrowserThreadsStarted::Subsystem:MidiManager"); |
| 1185 midi_manager_.reset(media::midi::MidiManager::Create()); | 1189 midi_manager_.reset(media::midi::MidiManager::Create()); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1392 DCHECK(is_tracing_startup_for_duration_); | 1396 DCHECK(is_tracing_startup_for_duration_); |
| 1393 | 1397 |
| 1394 is_tracing_startup_for_duration_ = false; | 1398 is_tracing_startup_for_duration_ = false; |
| 1395 TracingController::GetInstance()->DisableRecording( | 1399 TracingController::GetInstance()->DisableRecording( |
| 1396 TracingController::CreateFileSink( | 1400 TracingController::CreateFileSink( |
| 1397 startup_trace_file_, | 1401 startup_trace_file_, |
| 1398 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1402 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1399 } | 1403 } |
| 1400 | 1404 |
| 1401 } // namespace content | 1405 } // namespace content |
| OLD | NEW |