| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 49 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 50 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 50 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 51 #include "content/browser/gpu/compositor_util.h" | 51 #include "content/browser/gpu/compositor_util.h" |
| 52 #include "content/browser/gpu/gpu_data_manager_impl.h" | 52 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 53 #include "content/browser/gpu/gpu_process_host.h" | 53 #include "content/browser/gpu/gpu_process_host.h" |
| 54 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 54 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 55 #include "content/browser/histogram_synchronizer.h" | 55 #include "content/browser/histogram_synchronizer.h" |
| 56 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 56 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 57 #include "content/browser/loader_delegate_impl.h" | 57 #include "content/browser/loader_delegate_impl.h" |
| 58 #include "content/browser/media/media_internals.h" | 58 #include "content/browser/media/media_internals.h" |
| 59 #include "content/browser/memory/memory_coordinator.h" |
| 59 #include "content/browser/net/browser_online_state_observer.h" | 60 #include "content/browser/net/browser_online_state_observer.h" |
| 60 #include "content/browser/renderer_host/media/media_stream_manager.h" | 61 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 61 #include "content/browser/renderer_host/render_process_host_impl.h" | 62 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 62 #include "content/browser/service_manager/service_manager_context.h" | 63 #include "content/browser/service_manager/service_manager_context.h" |
| 63 #include "content/browser/speech/speech_recognition_manager_impl.h" | 64 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| 64 #include "content/browser/startup_task_runner.h" | 65 #include "content/browser/startup_task_runner.h" |
| 65 #include "content/browser/utility_process_host_impl.h" | 66 #include "content/browser/utility_process_host_impl.h" |
| 66 #include "content/browser/webui/content_web_ui_controller_factory.h" | 67 #include "content/browser/webui/content_web_ui_controller_factory.h" |
| 67 #include "content/browser/webui/url_data_manager.h" | 68 #include "content/browser/webui/url_data_manager.h" |
| 68 #include "content/common/content_switches_internal.h" | 69 #include "content/common/content_switches_internal.h" |
| 69 #include "content/common/host_discardable_shared_memory_manager.h" | 70 #include "content/common/host_discardable_shared_memory_manager.h" |
| 70 #include "content/common/host_shared_bitmap_manager.h" | 71 #include "content/common/host_shared_bitmap_manager.h" |
| 71 #include "content/common/service_manager/service_manager_connection_impl.h" | 72 #include "content/common/service_manager/service_manager_connection_impl.h" |
| 72 #include "content/public/browser/browser_main_parts.h" | 73 #include "content/public/browser/browser_main_parts.h" |
| 73 #include "content/public/browser/content_browser_client.h" | 74 #include "content/public/browser/content_browser_client.h" |
| 74 #include "content/public/browser/gpu_data_manager_observer.h" | 75 #include "content/public/browser/gpu_data_manager_observer.h" |
| 75 #include "content/public/browser/render_process_host.h" | 76 #include "content/public/browser/render_process_host.h" |
| 76 #include "content/public/browser/tracing_controller.h" | 77 #include "content/public/browser/tracing_controller.h" |
| 77 #include "content/public/common/content_client.h" | 78 #include "content/public/common/content_client.h" |
| 79 #include "content/public/common/content_features.h" |
| 78 #include "content/public/common/content_switches.h" | 80 #include "content/public/common/content_switches.h" |
| 79 #include "content/public/common/main_function_params.h" | 81 #include "content/public/common/main_function_params.h" |
| 80 #include "content/public/common/result_codes.h" | 82 #include "content/public/common/result_codes.h" |
| 81 #include "device/battery/battery_status_service.h" | 83 #include "device/battery/battery_status_service.h" |
| 82 #include "device/time_zone_monitor/time_zone_monitor.h" | 84 #include "device/time_zone_monitor/time_zone_monitor.h" |
| 83 #include "media/base/media.h" | 85 #include "media/base/media.h" |
| 84 #include "media/base/user_input_monitor.h" | 86 #include "media/base/user_input_monitor.h" |
| 85 #include "media/midi/midi_manager.h" | 87 #include "media/midi/midi_manager.h" |
| 86 #include "mojo/edk/embedder/embedder.h" | 88 #include "mojo/edk/embedder/embedder.h" |
| 87 #include "mojo/edk/embedder/scoped_ipc_support.h" | 89 #include "mojo/edk/embedder/scoped_ipc_support.h" |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 memory_pressure_monitor_.reset(new base::chromeos::MemoryPressureMonitor( | 755 memory_pressure_monitor_.reset(new base::chromeos::MemoryPressureMonitor( |
| 754 chromeos::switches::GetMemoryPressureThresholds())); | 756 chromeos::switches::GetMemoryPressureThresholds())); |
| 755 } | 757 } |
| 756 #elif defined(OS_MACOSX) | 758 #elif defined(OS_MACOSX) |
| 757 memory_pressure_monitor_.reset(new base::mac::MemoryPressureMonitor()); | 759 memory_pressure_monitor_.reset(new base::mac::MemoryPressureMonitor()); |
| 758 #elif defined(OS_WIN) | 760 #elif defined(OS_WIN) |
| 759 memory_pressure_monitor_.reset(CreateWinMemoryPressureMonitor( | 761 memory_pressure_monitor_.reset(CreateWinMemoryPressureMonitor( |
| 760 parsed_command_line_)); | 762 parsed_command_line_)); |
| 761 #endif | 763 #endif |
| 762 | 764 |
| 765 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) |
| 766 MemoryCoordinator::GetInstance()->Start(); |
| 767 |
| 763 #if defined(ENABLE_PLUGINS) | 768 #if defined(ENABLE_PLUGINS) |
| 764 // Prior to any processing happening on the IO thread, we create the | 769 // Prior to any processing happening on the IO thread, we create the |
| 765 // plugin service as it is predominantly used from the IO thread, | 770 // plugin service as it is predominantly used from the IO thread, |
| 766 // but must be created on the main thread. The service ctor is | 771 // but must be created on the main thread. The service ctor is |
| 767 // inexpensive and does not invoke the io_thread() accessor. | 772 // inexpensive and does not invoke the io_thread() accessor. |
| 768 { | 773 { |
| 769 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); | 774 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); |
| 770 PluginService::GetInstance()->Init(); | 775 PluginService::GetInstance()->Init(); |
| 771 } | 776 } |
| 772 #endif | 777 #endif |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1571 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1567 audio_thread_->task_runner(); | 1572 audio_thread_->task_runner(); |
| 1568 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1573 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1569 std::move(worker_task_runner), | 1574 std::move(worker_task_runner), |
| 1570 MediaInternals::GetInstance()); | 1575 MediaInternals::GetInstance()); |
| 1571 } | 1576 } |
| 1572 CHECK(audio_manager_); | 1577 CHECK(audio_manager_); |
| 1573 } | 1578 } |
| 1574 | 1579 |
| 1575 } // namespace content | 1580 } // namespace content |
| OLD | NEW |