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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 #include "base/timer/hi_res_timer_manager.h" | 46 #include "base/timer/hi_res_timer_manager.h" |
| 47 #include "base/trace_event/memory_dump_manager.h" | 47 #include "base/trace_event/memory_dump_manager.h" |
| 48 #include "base/trace_event/trace_event.h" | 48 #include "base/trace_event/trace_event.h" |
| 49 #include "build/build_config.h" | 49 #include "build/build_config.h" |
| 50 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h" | 50 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h" |
| 51 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 51 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 52 #include "components/tracing/common/trace_config_file.h" | 52 #include "components/tracing/common/trace_config_file.h" |
| 53 #include "components/tracing/common/trace_to_console.h" | 53 #include "components/tracing/common/trace_to_console.h" |
| 54 #include "components/tracing/common/tracing_switches.h" | 54 #include "components/tracing/common/tracing_switches.h" |
| 55 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" | 55 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
| 56 #include "components/viz/host/frame_sink_manager_host.h" | |
| 56 #include "content/browser/browser_thread_impl.h" | 57 #include "content/browser/browser_thread_impl.h" |
| 57 #include "content/browser/child_process_security_policy_impl.h" | 58 #include "content/browser/child_process_security_policy_impl.h" |
| 58 #include "content/browser/dom_storage/dom_storage_area.h" | 59 #include "content/browser/dom_storage/dom_storage_area.h" |
| 59 #include "content/browser/download/download_resource_handler.h" | 60 #include "content/browser/download/download_resource_handler.h" |
| 60 #include "content/browser/download/save_file_manager.h" | 61 #include "content/browser/download/save_file_manager.h" |
| 61 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 62 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 62 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 63 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 63 #include "content/browser/gpu/compositor_util.h" | 64 #include "content/browser/gpu/compositor_util.h" |
| 64 #include "content/browser/gpu/gpu_data_manager_impl.h" | 65 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 65 #include "content/browser/gpu/gpu_process_host.h" | 66 #include "content/browser/gpu/gpu_process_host.h" |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1217 "BrowserMainLoop::Subsystem:SpeechRecognitionManager"); | 1218 "BrowserMainLoop::Subsystem:SpeechRecognitionManager"); |
| 1218 io_thread_->task_runner()->DeleteSoon(FROM_HERE, | 1219 io_thread_->task_runner()->DeleteSoon(FROM_HERE, |
| 1219 speech_recognition_manager_.release()); | 1220 speech_recognition_manager_.release()); |
| 1220 | 1221 |
| 1221 memory_pressure_monitor_.reset(); | 1222 memory_pressure_monitor_.reset(); |
| 1222 | 1223 |
| 1223 #if defined(OS_MACOSX) | 1224 #if defined(OS_MACOSX) |
| 1224 BrowserCompositorMac::DisableRecyclingForShutdown(); | 1225 BrowserCompositorMac::DisableRecyclingForShutdown(); |
| 1225 #endif | 1226 #endif |
| 1226 | 1227 |
| 1228 frame_sink_manager_host_.reset(); | |
| 1229 | |
| 1227 #if defined(USE_AURA) || defined(OS_MACOSX) | 1230 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 1228 { | 1231 { |
| 1229 TRACE_EVENT0("shutdown", | 1232 TRACE_EVENT0("shutdown", |
| 1230 "BrowserMainLoop::Subsystem:ImageTransportFactory"); | 1233 "BrowserMainLoop::Subsystem:ImageTransportFactory"); |
| 1231 ImageTransportFactory::Terminate(); | 1234 ImageTransportFactory::Terminate(); |
| 1232 } | 1235 } |
| 1233 #endif | 1236 #endif |
| 1234 | 1237 |
| 1235 // The device monitors are using |system_monitor_| as dependency, so delete | 1238 // The device monitors are using |system_monitor_| as dependency, so delete |
| 1236 // them before |system_monitor_| goes away. | 1239 // them before |system_monitor_| goes away. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1448 DCHECK(factory); | 1451 DCHECK(factory); |
| 1449 ImageTransportFactory::Initialize(); | 1452 ImageTransportFactory::Initialize(); |
| 1450 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); | 1453 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); |
| 1451 #if defined(USE_AURA) | 1454 #if defined(USE_AURA) |
| 1452 if (env_->mode() == aura::Env::Mode::LOCAL) { | 1455 if (env_->mode() == aura::Env::Mode::LOCAL) { |
| 1453 env_->set_context_factory(GetContextFactory()); | 1456 env_->set_context_factory(GetContextFactory()); |
| 1454 env_->set_context_factory_private(GetContextFactoryPrivate()); | 1457 env_->set_context_factory_private(GetContextFactoryPrivate()); |
| 1455 } | 1458 } |
| 1456 #endif // defined(USE_AURA) | 1459 #endif // defined(USE_AURA) |
| 1457 #endif // defined(OS_ANDROID) | 1460 #endif // defined(OS_ANDROID) |
| 1461 if (!service_manager::ServiceManagerIsRemote()) { | |
|
danakj
2017/06/09 22:54:09
Don't we need a FrameSinkManagerHost when the Serv
Fady Samuel
2017/06/09 22:55:00
No, the FrameSinkManagerHost is in the window serv
danakj
2017/06/09 22:57:45
Oh I see, this is different than FrameSinkManagerI
| |
| 1462 frame_sink_manager_host_ = base::MakeUnique<viz::FrameSinkManagerHost>(); | |
| 1463 frame_sink_manager_host_->ConnectToFrameSinkManager(); | |
| 1464 } | |
| 1458 | 1465 |
| 1459 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that | 1466 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that |
| 1460 // unregistration happens on the IO thread (See | 1467 // unregistration happens on the IO thread (See |
| 1461 // BrowserProcessSubThread::IOThreadPreCleanUp). | 1468 // BrowserProcessSubThread::IOThreadPreCleanUp). |
| 1462 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1469 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1463 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager", | 1470 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager", |
| 1464 io_thread_->task_runner()); | 1471 io_thread_->task_runner()); |
| 1465 #if defined(OS_ANDROID) | 1472 #if defined(OS_ANDROID) |
| 1466 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1473 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1467 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", | 1474 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1770 base::MakeUnique<media::AudioThreadImpl>(), | 1777 base::MakeUnique<media::AudioThreadImpl>(), |
| 1771 MediaInternals::GetInstance()); | 1778 MediaInternals::GetInstance()); |
| 1772 } | 1779 } |
| 1773 CHECK(audio_manager_); | 1780 CHECK(audio_manager_); |
| 1774 | 1781 |
| 1775 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1782 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1776 CHECK(audio_system_); | 1783 CHECK(audio_system_); |
| 1777 } | 1784 } |
| 1778 | 1785 |
| 1779 } // namespace content | 1786 } // namespace content |
| OLD | NEW |