| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 // not running in mus+ash. | 699 // not running in mus+ash. |
| 699 if (!service_manager::ServiceManagerIsRemote()) { | 700 if (!service_manager::ServiceManagerIsRemote()) { |
| 700 discardable_shared_memory_manager_ = | 701 discardable_shared_memory_manager_ = |
| 701 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>(); | 702 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>(); |
| 702 // TODO(boliu): kSingleProcess check is a temporary workaround for | 703 // TODO(boliu): kSingleProcess check is a temporary workaround for |
| 703 // in-process Android WebView. crbug.com/503724 tracks proper fix. | 704 // in-process Android WebView. crbug.com/503724 tracks proper fix. |
| 704 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 705 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 705 base::DiscardableMemoryAllocator::SetInstance( | 706 base::DiscardableMemoryAllocator::SetInstance( |
| 706 discardable_shared_memory_manager_.get()); | 707 discardable_shared_memory_manager_.get()); |
| 707 } | 708 } |
| 709 frame_sink_manager_host_ = base::MakeUnique<viz::FrameSinkManagerHost>(); |
| 710 frame_sink_manager_host_->ConnectToFrameSinkManager(); |
| 708 } | 711 } |
| 709 | 712 |
| 710 if (parts_) | 713 if (parts_) |
| 711 parts_->PostMainMessageLoopStart(); | 714 parts_->PostMainMessageLoopStart(); |
| 712 | 715 |
| 713 // Start startup tracing through TracingController's interface. TraceLog has | 716 // Start startup tracing through TracingController's interface. TraceLog has |
| 714 // been enabled in content_main_runner where threads are not available. Now We | 717 // been enabled in content_main_runner where threads are not available. Now We |
| 715 // need to start tracing for all other tracing agents, which require threads. | 718 // need to start tracing for all other tracing agents, which require threads. |
| 716 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) { | 719 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) { |
| 717 base::trace_event::TraceConfig trace_config( | 720 base::trace_event::TraceConfig trace_config( |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 base::MakeUnique<media::AudioThreadImpl>(), | 1773 base::MakeUnique<media::AudioThreadImpl>(), |
| 1771 MediaInternals::GetInstance()); | 1774 MediaInternals::GetInstance()); |
| 1772 } | 1775 } |
| 1773 CHECK(audio_manager_); | 1776 CHECK(audio_manager_); |
| 1774 | 1777 |
| 1775 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1778 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1776 CHECK(audio_system_); | 1779 CHECK(audio_system_); |
| 1777 } | 1780 } |
| 1778 | 1781 |
| 1779 } // namespace content | 1782 } // namespace content |
| OLD | NEW |