| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #if defined(OS_MACOSX) && !defined(OS_IOS) | 100 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 101 #include "base/memory/memory_pressure_monitor_mac.h" | 101 #include "base/memory/memory_pressure_monitor_mac.h" |
| 102 #include "content/browser/bootstrap_sandbox_mac.h" | 102 #include "content/browser/bootstrap_sandbox_mac.h" |
| 103 #include "content/browser/browser_io_surface_manager_mac.h" | 103 #include "content/browser/browser_io_surface_manager_mac.h" |
| 104 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 104 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 105 #include "content/browser/compositor/browser_compositor_view_mac.h" | 105 #include "content/browser/compositor/browser_compositor_view_mac.h" |
| 106 #include "content/browser/in_process_io_surface_manager_mac.h" | 106 #include "content/browser/in_process_io_surface_manager_mac.h" |
| 107 #include "content/browser/theme_helper_mac.h" | 107 #include "content/browser/theme_helper_mac.h" |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 #if defined(USE_OZONE) |
| 111 #include "content/browser/gpu/browser_native_pixmap_manager_ozone.h" |
| 112 #endif |
| 113 |
| 110 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
| 111 #include <windows.h> | 115 #include <windows.h> |
| 112 #include <commctrl.h> | 116 #include <commctrl.h> |
| 113 #include <shellapi.h> | 117 #include <shellapi.h> |
| 114 | 118 |
| 115 #include "base/memory/memory_pressure_monitor_win.h" | 119 #include "base/memory/memory_pressure_monitor_win.h" |
| 116 #include "content/browser/system_message_window_win.h" | 120 #include "content/browser/system_message_window_win.h" |
| 117 #include "content/common/sandbox_win.h" | 121 #include "content/common/sandbox_win.h" |
| 118 #include "net/base/winsock_init.h" | 122 #include "net/base/winsock_init.h" |
| 119 #include "ui/base/l10n/l10n_util_win.h" | 123 #include "ui/base/l10n/l10n_util_win.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 { | 610 { |
| 607 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); | 611 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); |
| 608 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 612 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 609 IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance()); | 613 IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance()); |
| 610 } else { | 614 } else { |
| 611 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); | 615 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 612 } | 616 } |
| 613 } | 617 } |
| 614 #endif | 618 #endif |
| 615 | 619 |
| 620 #if defined(USE_OZONE) |
| 621 DCHECK(!ui::NativePixmapManager::GetInstance()); |
| 622 ui::NativePixmapManager::SetInstance( |
| 623 BrowserNativePixmapManager::GetInstance()); |
| 624 #endif |
| 625 |
| 616 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 626 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 617 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 627 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
| 618 memory_observer_.reset(new MemoryObserver()); | 628 memory_observer_.reset(new MemoryObserver()); |
| 619 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 629 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 620 } | 630 } |
| 621 | 631 |
| 622 if (parsed_command_line_.HasSwitch( | 632 if (parsed_command_line_.HasSwitch( |
| 623 switches::kEnableAggressiveDOMStorageFlushing)) { | 633 switches::kEnableAggressiveDOMStorageFlushing)) { |
| 624 TRACE_EVENT0("startup", | 634 TRACE_EVENT0("startup", |
| 625 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 635 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 DCHECK(is_tracing_startup_); | 1355 DCHECK(is_tracing_startup_); |
| 1346 | 1356 |
| 1347 is_tracing_startup_ = false; | 1357 is_tracing_startup_ = false; |
| 1348 TracingController::GetInstance()->DisableRecording( | 1358 TracingController::GetInstance()->DisableRecording( |
| 1349 TracingController::CreateFileSink( | 1359 TracingController::CreateFileSink( |
| 1350 startup_trace_file_, | 1360 startup_trace_file_, |
| 1351 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1361 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1352 } | 1362 } |
| 1353 | 1363 |
| 1354 } // namespace content | 1364 } // namespace content |
| OLD | NEW |