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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 #include "content/browser/media/android/browser_media_player_manager.h" | 127 #include "content/browser/media/android/browser_media_player_manager.h" |
128 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" | 128 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" |
129 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 129 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
130 #include "media/base/android/media_client_android.h" | 130 #include "media/base/android/media_client_android.h" |
131 #include "ui/android/screen_android.h" | 131 #include "ui/android/screen_android.h" |
132 #include "ui/display/screen.h" | 132 #include "ui/display/screen.h" |
133 #include "ui/gl/gl_surface.h" | 133 #include "ui/gl/gl_surface.h" |
134 #endif | 134 #endif |
135 | 135 |
136 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
| 137 #include "base/allocator/allocator_interception_mac.h" |
137 #include "base/memory/memory_pressure_monitor_mac.h" | 138 #include "base/memory/memory_pressure_monitor_mac.h" |
138 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 139 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
139 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 140 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
140 #include "content/browser/mach_broker_mac.h" | 141 #include "content/browser/mach_broker_mac.h" |
141 #include "content/browser/renderer_host/browser_compositor_view_mac.h" | 142 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
142 #include "content/browser/theme_helper_mac.h" | 143 #include "content/browser/theme_helper_mac.h" |
143 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 144 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
144 #endif | 145 #endif |
145 | 146 |
146 #if defined(USE_OZONE) | 147 #if defined(USE_OZONE) |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 // the second time. | 864 // the second time. |
864 base::FeatureList::InitializeInstance( | 865 base::FeatureList::InitializeInstance( |
865 command_line->GetSwitchValueASCII(switches::kEnableFeatures), | 866 command_line->GetSwitchValueASCII(switches::kEnableFeatures), |
866 command_line->GetSwitchValueASCII(switches::kDisableFeatures)); | 867 command_line->GetSwitchValueASCII(switches::kDisableFeatures)); |
867 | 868 |
868 InitializeMemoryManagementComponent(); | 869 InitializeMemoryManagementComponent(); |
869 | 870 |
870 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) | 871 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) |
871 MemoryCoordinatorImpl::GetInstance()->Start(); | 872 MemoryCoordinatorImpl::GetInstance()->Start(); |
872 | 873 |
| 874 #if defined(OS_MACOSX) |
| 875 base::allocator::PeriodicallyShimNewMallocZones(); |
| 876 #endif |
| 877 |
873 #if BUILDFLAG(ENABLE_PLUGINS) | 878 #if BUILDFLAG(ENABLE_PLUGINS) |
874 // Prior to any processing happening on the IO thread, we create the | 879 // Prior to any processing happening on the IO thread, we create the |
875 // plugin service as it is predominantly used from the IO thread, | 880 // plugin service as it is predominantly used from the IO thread, |
876 // but must be created on the main thread. The service ctor is | 881 // but must be created on the main thread. The service ctor is |
877 // inexpensive and does not invoke the io_thread() accessor. | 882 // inexpensive and does not invoke the io_thread() accessor. |
878 { | 883 { |
879 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); | 884 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); |
880 PluginService::GetInstance()->Init(); | 885 PluginService::GetInstance()->Init(); |
881 } | 886 } |
882 #endif | 887 #endif |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), | 1791 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
1787 MediaInternals::GetInstance()); | 1792 MediaInternals::GetInstance()); |
1788 } | 1793 } |
1789 CHECK(audio_manager_); | 1794 CHECK(audio_manager_); |
1790 | 1795 |
1791 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1796 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
1792 CHECK(audio_system_); | 1797 CHECK(audio_system_); |
1793 } | 1798 } |
1794 | 1799 |
1795 } // namespace content | 1800 } // namespace content |
OLD | NEW |