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