| 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 28 matching lines...) Expand all Loading... |
| 39 #include "base/task_scheduler/task_traits.h" | 39 #include "base/task_scheduler/task_traits.h" |
| 40 #include "base/threading/sequenced_worker_pool.h" | 40 #include "base/threading/sequenced_worker_pool.h" |
| 41 #include "base/threading/thread_restrictions.h" | 41 #include "base/threading/thread_restrictions.h" |
| 42 #include "base/threading/thread_task_runner_handle.h" | 42 #include "base/threading/thread_task_runner_handle.h" |
| 43 #include "base/time/time.h" | 43 #include "base/time/time.h" |
| 44 #include "base/timer/hi_res_timer_manager.h" | 44 #include "base/timer/hi_res_timer_manager.h" |
| 45 #include "base/trace_event/memory_dump_manager.h" | 45 #include "base/trace_event/memory_dump_manager.h" |
| 46 #include "base/trace_event/trace_event.h" | 46 #include "base/trace_event/trace_event.h" |
| 47 #include "build/build_config.h" | 47 #include "build/build_config.h" |
| 48 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" | 48 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
| 49 #include "components/display_compositor/host_shared_bitmap_manager.h" | |
| 50 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 49 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 51 #include "components/tracing/common/trace_config_file.h" | 50 #include "components/tracing/common/trace_config_file.h" |
| 52 #include "components/tracing/common/trace_to_console.h" | 51 #include "components/tracing/common/trace_to_console.h" |
| 53 #include "components/tracing/common/tracing_switches.h" | 52 #include "components/tracing/common/tracing_switches.h" |
| 53 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
| 54 #include "content/browser/audio_manager_thread.h" | 54 #include "content/browser/audio_manager_thread.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" |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. | 801 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. |
| 802 memory_instrumentation_coordinator_ = | 802 memory_instrumentation_coordinator_ = |
| 803 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( | 803 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( |
| 804 true /* initialize_memory_dump_manager */); | 804 true /* initialize_memory_dump_manager */); |
| 805 | 805 |
| 806 // Enable memory-infra dump providers. | 806 // Enable memory-infra dump providers. |
| 807 InitSkiaEventTracer(); | 807 InitSkiaEventTracer(); |
| 808 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( | 808 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
| 809 base::kNullProcessId); | 809 base::kNullProcessId); |
| 810 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 810 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 811 display_compositor::HostSharedBitmapManager::current(), | 811 viz::HostSharedBitmapManager::current(), "viz::HostSharedBitmapManager", |
| 812 "display_compositor::HostSharedBitmapManager", nullptr); | 812 nullptr); |
| 813 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 813 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 814 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 814 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
| 815 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 815 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 816 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 816 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
| 817 } | 817 } |
| 818 | 818 |
| 819 int BrowserMainLoop::PreCreateThreads() { | 819 int BrowserMainLoop::PreCreateThreads() { |
| 820 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by | 820 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by |
| 821 // either |parts_|->PreCreateThreads() or | 821 // either |parts_|->PreCreateThreads() or |
| 822 // base::SequencedWorkerPool::EnableForProcess(). | 822 // base::SequencedWorkerPool::EnableForProcess(). |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1771 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 1772 MediaInternals::GetInstance()); | 1772 MediaInternals::GetInstance()); |
| 1773 } | 1773 } |
| 1774 CHECK(audio_manager_); | 1774 CHECK(audio_manager_); |
| 1775 | 1775 |
| 1776 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1776 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1777 CHECK(audio_system_); | 1777 CHECK(audio_system_); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 } // namespace content | 1780 } // namespace content |
| OLD | NEW |