| 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 29 matching lines...) Expand all Loading... |
| 40 #include "base/task_scheduler/task_traits.h" | 40 #include "base/task_scheduler/task_traits.h" |
| 41 #include "base/threading/sequenced_worker_pool.h" | 41 #include "base/threading/sequenced_worker_pool.h" |
| 42 #include "base/threading/thread_restrictions.h" | 42 #include "base/threading/thread_restrictions.h" |
| 43 #include "base/threading/thread_task_runner_handle.h" | 43 #include "base/threading/thread_task_runner_handle.h" |
| 44 #include "base/time/time.h" | 44 #include "base/time/time.h" |
| 45 #include "base/timer/hi_res_timer_manager.h" | 45 #include "base/timer/hi_res_timer_manager.h" |
| 46 #include "base/trace_event/memory_dump_manager.h" | 46 #include "base/trace_event/memory_dump_manager.h" |
| 47 #include "base/trace_event/trace_event.h" | 47 #include "base/trace_event/trace_event.h" |
| 48 #include "build/build_config.h" | 48 #include "build/build_config.h" |
| 49 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" | 49 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
| 50 #include "components/display_compositor/host_shared_bitmap_manager.h" | |
| 51 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 50 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 52 #include "components/tracing/common/trace_config_file.h" | 51 #include "components/tracing/common/trace_config_file.h" |
| 53 #include "components/tracing/common/trace_to_console.h" | 52 #include "components/tracing/common/trace_to_console.h" |
| 54 #include "components/tracing/common/tracing_switches.h" | 53 #include "components/tracing/common/tracing_switches.h" |
| 54 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
| 55 #include "content/browser/browser_thread_impl.h" | 55 #include "content/browser/browser_thread_impl.h" |
| 56 #include "content/browser/dom_storage/dom_storage_area.h" | 56 #include "content/browser/dom_storage/dom_storage_area.h" |
| 57 #include "content/browser/download/download_resource_handler.h" | 57 #include "content/browser/download/download_resource_handler.h" |
| 58 #include "content/browser/download/save_file_manager.h" | 58 #include "content/browser/download/save_file_manager.h" |
| 59 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 59 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 60 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 60 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 61 #include "content/browser/gpu/compositor_util.h" | 61 #include "content/browser/gpu/compositor_util.h" |
| 62 #include "content/browser/gpu/gpu_data_manager_impl.h" | 62 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 63 #include "content/browser/gpu/gpu_process_host.h" | 63 #include "content/browser/gpu/gpu_process_host.h" |
| 64 #include "content/browser/gpu/shader_cache_factory.h" | 64 #include "content/browser/gpu/shader_cache_factory.h" |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. | 803 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. |
| 804 memory_instrumentation_coordinator_ = | 804 memory_instrumentation_coordinator_ = |
| 805 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( | 805 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( |
| 806 true /* initialize_memory_dump_manager */); | 806 true /* initialize_memory_dump_manager */); |
| 807 | 807 |
| 808 // Enable memory-infra dump providers. | 808 // Enable memory-infra dump providers. |
| 809 InitSkiaEventTracer(); | 809 InitSkiaEventTracer(); |
| 810 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( | 810 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
| 811 base::kNullProcessId); | 811 base::kNullProcessId); |
| 812 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 812 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 813 display_compositor::HostSharedBitmapManager::current(), | 813 viz::HostSharedBitmapManager::current(), "viz::HostSharedBitmapManager", |
| 814 "display_compositor::HostSharedBitmapManager", nullptr); | 814 nullptr); |
| 815 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 815 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 816 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 816 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
| 817 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 817 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 818 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 818 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
| 819 } | 819 } |
| 820 | 820 |
| 821 int BrowserMainLoop::PreCreateThreads() { | 821 int BrowserMainLoop::PreCreateThreads() { |
| 822 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by | 822 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by |
| 823 // either |parts_|->PreCreateThreads() or | 823 // either |parts_|->PreCreateThreads() or |
| 824 // base::SequencedWorkerPool::EnableForProcess(). | 824 // base::SequencedWorkerPool::EnableForProcess(). |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1775 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 1776 MediaInternals::GetInstance()); | 1776 MediaInternals::GetInstance()); |
| 1777 } | 1777 } |
| 1778 CHECK(audio_manager_); | 1778 CHECK(audio_manager_); |
| 1779 | 1779 |
| 1780 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1780 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1781 CHECK(audio_system_); | 1781 CHECK(audio_system_); |
| 1782 } | 1782 } |
| 1783 | 1783 |
| 1784 } // namespace content | 1784 } // namespace content |
| OLD | NEW |