| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 #if defined(USE_OZONE) | 147 #if defined(USE_OZONE) |
| 148 #include "ui/ozone/public/client_native_pixmap_factory.h" | 148 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 149 #endif | 149 #endif |
| 150 | 150 |
| 151 #if defined(OS_WIN) | 151 #if defined(OS_WIN) |
| 152 #include <windows.h> | 152 #include <windows.h> |
| 153 #include <commctrl.h> | 153 #include <commctrl.h> |
| 154 #include <shellapi.h> | 154 #include <shellapi.h> |
| 155 | 155 |
| 156 #include "base/memory/memory_pressure_monitor_win.h" | 156 #include "base/memory/memory_pressure_monitor_win.h" |
| 157 #include "base/win/windows_version.h" | |
| 158 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" | |
| 159 #include "content/common/sandbox_win.h" | 157 #include "content/common/sandbox_win.h" |
| 160 #include "net/base/winsock_init.h" | 158 #include "net/base/winsock_init.h" |
| 161 #include "ui/base/l10n/l10n_util_win.h" | 159 #include "ui/base/l10n/l10n_util_win.h" |
| 162 #endif | 160 #endif |
| 163 | 161 |
| 164 #if defined(OS_CHROMEOS) | 162 #if defined(OS_CHROMEOS) |
| 165 #include "base/memory/memory_pressure_monitor_chromeos.h" | 163 #include "base/memory/memory_pressure_monitor_chromeos.h" |
| 166 #include "chromeos/chromeos_switches.h" | 164 #include "chromeos/chromeos_switches.h" |
| 167 #endif | 165 #endif |
| 168 | 166 |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 system_stats_monitor_.reset( | 728 system_stats_monitor_.reset( |
| 731 new base::trace_event::TraceEventSystemStatsMonitor( | 729 new base::trace_event::TraceEventSystemStatsMonitor( |
| 732 base::ThreadTaskRunnerHandle::Get())); | 730 base::ThreadTaskRunnerHandle::Get())); |
| 733 } | 731 } |
| 734 | 732 |
| 735 { | 733 { |
| 736 base::SetRecordActionTaskRunner( | 734 base::SetRecordActionTaskRunner( |
| 737 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); | 735 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); |
| 738 } | 736 } |
| 739 | 737 |
| 740 #if defined(OS_WIN) | |
| 741 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | |
| 742 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); | |
| 743 #endif | |
| 744 | |
| 745 // Only use discardable_memory::DiscardableSharedMemoryManager when Chrome is | 738 // Only use discardable_memory::DiscardableSharedMemoryManager when Chrome is |
| 746 // not running in mus+ash. | 739 // not running in mus+ash. |
| 747 if (!service_manager::ServiceManagerIsRemote()) { | 740 if (!service_manager::ServiceManagerIsRemote()) { |
| 748 discardable_shared_memory_manager_ = | 741 discardable_shared_memory_manager_ = |
| 749 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>(); | 742 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>(); |
| 750 // TODO(boliu): kSingleProcess check is a temporary workaround for | 743 // TODO(boliu): kSingleProcess check is a temporary workaround for |
| 751 // in-process Android WebView. crbug.com/503724 tracks proper fix. | 744 // in-process Android WebView. crbug.com/503724 tracks proper fix. |
| 752 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 745 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 753 base::DiscardableMemoryAllocator::SetInstance( | 746 base::DiscardableMemoryAllocator::SetInstance( |
| 754 discardable_shared_memory_manager_.get()); | 747 discardable_shared_memory_manager_.get()); |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1781 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 1789 MediaInternals::GetInstance()); | 1782 MediaInternals::GetInstance()); |
| 1790 } | 1783 } |
| 1791 CHECK(audio_manager_); | 1784 CHECK(audio_manager_); |
| 1792 | 1785 |
| 1793 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1786 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
| 1794 CHECK(audio_system_); | 1787 CHECK(audio_system_); |
| 1795 } | 1788 } |
| 1796 | 1789 |
| 1797 } // namespace content | 1790 } // namespace content |
| OLD | NEW |