| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 #include "ui/ozone/public/client_native_pixmap_factory.h" | 124 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 125 #include "ui/ozone/public/ozone_platform.h" | 125 #include "ui/ozone/public/ozone_platform.h" |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(OS_WIN) | 128 #if defined(OS_WIN) |
| 129 #include <windows.h> | 129 #include <windows.h> |
| 130 #include <commctrl.h> | 130 #include <commctrl.h> |
| 131 #include <shellapi.h> | 131 #include <shellapi.h> |
| 132 | 132 |
| 133 #include "base/memory/memory_pressure_monitor_win.h" | 133 #include "base/memory/memory_pressure_monitor_win.h" |
| 134 #include "base/win/windows_version.h" |
| 135 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" |
| 134 #include "content/common/sandbox_win.h" | 136 #include "content/common/sandbox_win.h" |
| 135 #include "net/base/winsock_init.h" | 137 #include "net/base/winsock_init.h" |
| 136 #include "ui/base/l10n/l10n_util_win.h" | 138 #include "ui/base/l10n/l10n_util_win.h" |
| 137 #endif | 139 #endif |
| 138 | 140 |
| 139 #if defined(OS_CHROMEOS) | 141 #if defined(OS_CHROMEOS) |
| 140 #include "base/memory/memory_pressure_monitor_chromeos.h" | 142 #include "base/memory/memory_pressure_monitor_chromeos.h" |
| 141 #include "chromeos/chromeos_switches.h" | 143 #include "chromeos/chromeos_switches.h" |
| 142 #endif | 144 #endif |
| 143 | 145 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 online_state_observer_.reset(new BrowserOnlineStateObserver); | 588 online_state_observer_.reset(new BrowserOnlineStateObserver); |
| 587 } | 589 } |
| 588 | 590 |
| 589 { | 591 { |
| 590 system_stats_monitor_.reset( | 592 system_stats_monitor_.reset( |
| 591 new base::trace_event::TraceEventSystemStatsMonitor( | 593 new base::trace_event::TraceEventSystemStatsMonitor( |
| 592 base::ThreadTaskRunnerHandle::Get())); | 594 base::ThreadTaskRunnerHandle::Get())); |
| 593 } | 595 } |
| 594 #endif // !defined(OS_IOS) | 596 #endif // !defined(OS_IOS) |
| 595 | 597 |
| 598 #if defined(OS_WIN) |
| 599 if (base::win::GetVersion() >= base::win::VERSION_WIN8) |
| 600 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); |
| 601 #endif |
| 602 |
| 596 // TODO(boliu): kSingleProcess check is a temporary workaround for | 603 // TODO(boliu): kSingleProcess check is a temporary workaround for |
| 597 // in-process Android WebView. crbug.com/503724 tracks proper fix. | 604 // in-process Android WebView. crbug.com/503724 tracks proper fix. |
| 598 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 605 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 599 base::DiscardableMemoryAllocator::SetInstance( | 606 base::DiscardableMemoryAllocator::SetInstance( |
| 600 HostDiscardableSharedMemoryManager::current()); | 607 HostDiscardableSharedMemoryManager::current()); |
| 601 } | 608 } |
| 602 | 609 |
| 603 if (parts_) | 610 if (parts_) |
| 604 parts_->PostMainMessageLoopStart(); | 611 parts_->PostMainMessageLoopStart(); |
| 605 | 612 |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 DCHECK(is_tracing_startup_for_duration_); | 1473 DCHECK(is_tracing_startup_for_duration_); |
| 1467 | 1474 |
| 1468 is_tracing_startup_for_duration_ = false; | 1475 is_tracing_startup_for_duration_ = false; |
| 1469 TracingController::GetInstance()->StopTracing( | 1476 TracingController::GetInstance()->StopTracing( |
| 1470 TracingController::CreateFileSink( | 1477 TracingController::CreateFileSink( |
| 1471 startup_trace_file_, | 1478 startup_trace_file_, |
| 1472 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1479 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1473 } | 1480 } |
| 1474 | 1481 |
| 1475 } // namespace content | 1482 } // namespace content |
| OLD | NEW |