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 "ui/ozone/public/native_pixmap_manager.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 ui::NativePixmapManager::SetInstance( | |
622 ui::NativePixmapManager::Create().release()); | |
reveman
2015/07/23 18:25:23
Please add a member variable for the manager inste
dshwang
2015/07/24 12:19:00
Done.
| |
623 #endif | |
624 | |
616 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 625 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
617 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 626 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
618 memory_observer_.reset(new MemoryObserver()); | 627 memory_observer_.reset(new MemoryObserver()); |
619 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 628 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
620 } | 629 } |
621 | 630 |
622 if (parsed_command_line_.HasSwitch( | 631 if (parsed_command_line_.HasSwitch( |
623 switches::kEnableAggressiveDOMStorageFlushing)) { | 632 switches::kEnableAggressiveDOMStorageFlushing)) { |
624 TRACE_EVENT0("startup", | 633 TRACE_EVENT0("startup", |
625 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 634 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1345 DCHECK(is_tracing_startup_); | 1354 DCHECK(is_tracing_startup_); |
1346 | 1355 |
1347 is_tracing_startup_ = false; | 1356 is_tracing_startup_ = false; |
1348 TracingController::GetInstance()->DisableRecording( | 1357 TracingController::GetInstance()->DisableRecording( |
1349 TracingController::CreateFileSink( | 1358 TracingController::CreateFileSink( |
1350 startup_trace_file_, | 1359 startup_trace_file_, |
1351 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1360 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1352 } | 1361 } |
1353 | 1362 |
1354 } // namespace content | 1363 } // namespace content |
OLD | NEW |