| 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" |
| 49 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 50 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 50 #include "components/tracing/common/trace_config_file.h" | 51 #include "components/tracing/common/trace_config_file.h" |
| 51 #include "components/tracing/common/trace_to_console.h" | 52 #include "components/tracing/common/trace_to_console.h" |
| 52 #include "components/tracing/common/tracing_switches.h" | 53 #include "components/tracing/common/tracing_switches.h" |
| 53 #include "content/browser/audio_manager_thread.h" | 54 #include "content/browser/audio_manager_thread.h" |
| 54 #include "content/browser/browser_thread_impl.h" | 55 #include "content/browser/browser_thread_impl.h" |
| 55 #include "content/browser/dom_storage/dom_storage_area.h" | 56 #include "content/browser/dom_storage/dom_storage_area.h" |
| 56 #include "content/browser/download/download_resource_handler.h" | 57 #include "content/browser/download/download_resource_handler.h" |
| 57 #include "content/browser/download/save_file_manager.h" | 58 #include "content/browser/download/save_file_manager.h" |
| 58 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 59 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 #include "content/browser/net/browser_online_state_observer.h" | 71 #include "content/browser/net/browser_online_state_observer.h" |
| 71 #include "content/browser/renderer_host/media/media_stream_manager.h" | 72 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 72 #include "content/browser/renderer_host/render_process_host_impl.h" | 73 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 73 #include "content/browser/service_manager/service_manager_context.h" | 74 #include "content/browser/service_manager/service_manager_context.h" |
| 74 #include "content/browser/speech/speech_recognition_manager_impl.h" | 75 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| 75 #include "content/browser/startup_task_runner.h" | 76 #include "content/browser/startup_task_runner.h" |
| 76 #include "content/browser/utility_process_host_impl.h" | 77 #include "content/browser/utility_process_host_impl.h" |
| 77 #include "content/browser/webui/content_web_ui_controller_factory.h" | 78 #include "content/browser/webui/content_web_ui_controller_factory.h" |
| 78 #include "content/browser/webui/url_data_manager.h" | 79 #include "content/browser/webui/url_data_manager.h" |
| 79 #include "content/common/content_switches_internal.h" | 80 #include "content/common/content_switches_internal.h" |
| 80 #include "content/common/host_shared_bitmap_manager.h" | |
| 81 #include "content/common/service_manager/service_manager_connection_impl.h" | 81 #include "content/common/service_manager/service_manager_connection_impl.h" |
| 82 #include "content/public/browser/browser_main_parts.h" | 82 #include "content/public/browser/browser_main_parts.h" |
| 83 #include "content/public/browser/content_browser_client.h" | 83 #include "content/public/browser/content_browser_client.h" |
| 84 #include "content/public/browser/gpu_data_manager_observer.h" | 84 #include "content/public/browser/gpu_data_manager_observer.h" |
| 85 #include "content/public/browser/render_process_host.h" | 85 #include "content/public/browser/render_process_host.h" |
| 86 #include "content/public/browser/tracing_controller.h" | 86 #include "content/public/browser/tracing_controller.h" |
| 87 #include "content/public/common/content_client.h" | 87 #include "content/public/common/content_client.h" |
| 88 #include "content/public/common/content_features.h" | 88 #include "content/public/common/content_features.h" |
| 89 #include "content/public/common/content_switches.h" | 89 #include "content/public/common/content_switches.h" |
| 90 #include "content/public/common/main_function_params.h" | 90 #include "content/public/common/main_function_params.h" |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 TRACE_EVENT0("startup", | 824 TRACE_EVENT0("startup", |
| 825 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 825 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| 826 DOMStorageArea::EnableAggressiveCommitDelay(); | 826 DOMStorageArea::EnableAggressiveCommitDelay(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 // Enable memory-infra dump providers. | 829 // Enable memory-infra dump providers. |
| 830 InitSkiaEventTracer(); | 830 InitSkiaEventTracer(); |
| 831 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( | 831 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
| 832 base::kNullProcessId); | 832 base::kNullProcessId); |
| 833 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 833 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 834 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); | 834 display_compositor::HostSharedBitmapManager::current(), |
| 835 "display_compositor::HostSharedBitmapManager", nullptr); |
| 835 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 836 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 836 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 837 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
| 837 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 838 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 838 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 839 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
| 839 } | 840 } |
| 840 | 841 |
| 841 int BrowserMainLoop::PreCreateThreads() { | 842 int BrowserMainLoop::PreCreateThreads() { |
| 842 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by | 843 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by |
| 843 // either |parts_|->PreCreateThreads() or | 844 // either |parts_|->PreCreateThreads() or |
| 844 // base::SequencedWorkerPool::EnableForProcess(). | 845 // base::SequencedWorkerPool::EnableForProcess(). |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), | 1789 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
| 1789 MediaInternals::GetInstance()); | 1790 MediaInternals::GetInstance()); |
| 1790 } | 1791 } |
| 1791 CHECK(audio_manager_); | 1792 CHECK(audio_manager_); |
| 1792 | 1793 |
| 1793 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1794 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1794 CHECK(audio_system_); | 1795 CHECK(audio_system_); |
| 1795 } | 1796 } |
| 1796 | 1797 |
| 1797 } // namespace content | 1798 } // namespace content |
| OLD | NEW |