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 19 matching lines...) Expand all Loading... |
30 #include "base/single_thread_task_runner.h" | 30 #include "base/single_thread_task_runner.h" |
31 #include "base/strings/string_number_conversions.h" | 31 #include "base/strings/string_number_conversions.h" |
32 #include "base/strings/string_split.h" | 32 #include "base/strings/string_split.h" |
33 #include "base/system_monitor/system_monitor.h" | 33 #include "base/system_monitor/system_monitor.h" |
34 #include "base/threading/thread_restrictions.h" | 34 #include "base/threading/thread_restrictions.h" |
35 #include "base/threading/thread_task_runner_handle.h" | 35 #include "base/threading/thread_task_runner_handle.h" |
36 #include "base/timer/hi_res_timer_manager.h" | 36 #include "base/timer/hi_res_timer_manager.h" |
37 #include "base/trace_event/memory_dump_manager.h" | 37 #include "base/trace_event/memory_dump_manager.h" |
38 #include "base/trace_event/trace_event.h" | 38 #include "base/trace_event/trace_event.h" |
39 #include "build/build_config.h" | 39 #include "build/build_config.h" |
| 40 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
40 #include "components/tracing/browser/trace_config_file.h" | 41 #include "components/tracing/browser/trace_config_file.h" |
41 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 42 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
42 #include "components/tracing/common/trace_to_console.h" | 43 #include "components/tracing/common/trace_to_console.h" |
43 #include "components/tracing/common/tracing_switches.h" | 44 #include "components/tracing/common/tracing_switches.h" |
44 #include "content/browser/browser_thread_impl.h" | 45 #include "content/browser/browser_thread_impl.h" |
45 #include "content/browser/device_sensors/device_sensor_service.h" | 46 #include "content/browser/device_sensors/device_sensor_service.h" |
46 #include "content/browser/dom_storage/dom_storage_area.h" | 47 #include "content/browser/dom_storage/dom_storage_area.h" |
47 #include "content/browser/download/download_resource_handler.h" | 48 #include "content/browser/download/download_resource_handler.h" |
48 #include "content/browser/download/save_file_manager.h" | 49 #include "content/browser/download/save_file_manager.h" |
49 #include "content/browser/gamepad/gamepad_service.h" | 50 #include "content/browser/gamepad/gamepad_service.h" |
(...skipping 11 matching lines...) Expand all Loading... |
61 #include "content/browser/net/browser_online_state_observer.h" | 62 #include "content/browser/net/browser_online_state_observer.h" |
62 #include "content/browser/renderer_host/media/media_stream_manager.h" | 63 #include "content/browser/renderer_host/media/media_stream_manager.h" |
63 #include "content/browser/renderer_host/render_process_host_impl.h" | 64 #include "content/browser/renderer_host/render_process_host_impl.h" |
64 #include "content/browser/service_manager/service_manager_context.h" | 65 #include "content/browser/service_manager/service_manager_context.h" |
65 #include "content/browser/speech/speech_recognition_manager_impl.h" | 66 #include "content/browser/speech/speech_recognition_manager_impl.h" |
66 #include "content/browser/startup_task_runner.h" | 67 #include "content/browser/startup_task_runner.h" |
67 #include "content/browser/utility_process_host_impl.h" | 68 #include "content/browser/utility_process_host_impl.h" |
68 #include "content/browser/webui/content_web_ui_controller_factory.h" | 69 #include "content/browser/webui/content_web_ui_controller_factory.h" |
69 #include "content/browser/webui/url_data_manager.h" | 70 #include "content/browser/webui/url_data_manager.h" |
70 #include "content/common/content_switches_internal.h" | 71 #include "content/common/content_switches_internal.h" |
71 #include "content/common/host_discardable_shared_memory_manager.h" | |
72 #include "content/common/host_shared_bitmap_manager.h" | 72 #include "content/common/host_shared_bitmap_manager.h" |
73 #include "content/common/service_manager/service_manager_connection_impl.h" | 73 #include "content/common/service_manager/service_manager_connection_impl.h" |
74 #include "content/public/browser/browser_main_parts.h" | 74 #include "content/public/browser/browser_main_parts.h" |
75 #include "content/public/browser/content_browser_client.h" | 75 #include "content/public/browser/content_browser_client.h" |
76 #include "content/public/browser/gpu_data_manager_observer.h" | 76 #include "content/public/browser/gpu_data_manager_observer.h" |
77 #include "content/public/browser/render_process_host.h" | 77 #include "content/public/browser/render_process_host.h" |
78 #include "content/public/browser/tracing_controller.h" | 78 #include "content/public/browser/tracing_controller.h" |
79 #include "content/public/common/content_client.h" | 79 #include "content/public/common/content_client.h" |
80 #include "content/public/common/content_features.h" | 80 #include "content/public/common/content_features.h" |
81 #include "content/public/common/content_switches.h" | 81 #include "content/public/common/content_switches.h" |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 627 |
628 #if defined(OS_WIN) | 628 #if defined(OS_WIN) |
629 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | 629 if (base::win::GetVersion() >= base::win::VERSION_WIN8) |
630 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); | 630 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); |
631 #endif | 631 #endif |
632 | 632 |
633 // TODO(boliu): kSingleProcess check is a temporary workaround for | 633 // TODO(boliu): kSingleProcess check is a temporary workaround for |
634 // in-process Android WebView. crbug.com/503724 tracks proper fix. | 634 // in-process Android WebView. crbug.com/503724 tracks proper fix. |
635 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 635 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
636 base::DiscardableMemoryAllocator::SetInstance( | 636 base::DiscardableMemoryAllocator::SetInstance( |
637 HostDiscardableSharedMemoryManager::current()); | 637 discardable_memory::DiscardableSharedMemoryManager::current()); |
638 } | 638 } |
639 | 639 |
640 if (parts_) | 640 if (parts_) |
641 parts_->PostMainMessageLoopStart(); | 641 parts_->PostMainMessageLoopStart(); |
642 | 642 |
643 // Start startup tracing through TracingController's interface. TraceLog has | 643 // Start startup tracing through TracingController's interface. TraceLog has |
644 // been enabled in content_main_runner where threads are not available. Now We | 644 // been enabled in content_main_runner where threads are not available. Now We |
645 // need to start tracing for all other tracing agents, which require threads. | 645 // need to start tracing for all other tracing agents, which require threads. |
646 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) { | 646 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) { |
647 base::trace_event::TraceConfig trace_config( | 647 base::trace_event::TraceConfig trace_config( |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1592 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
1593 audio_thread_->task_runner(); | 1593 audio_thread_->task_runner(); |
1594 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1594 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
1595 std::move(worker_task_runner), | 1595 std::move(worker_task_runner), |
1596 MediaInternals::GetInstance()); | 1596 MediaInternals::GetInstance()); |
1597 } | 1597 } |
1598 CHECK(audio_manager_); | 1598 CHECK(audio_manager_); |
1599 } | 1599 } |
1600 | 1600 |
1601 } // namespace content | 1601 } // namespace content |
OLD | NEW |