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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/memory_pressure_monitor.h" | 10 #include "base/memory/memory_pressure_monitor.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 #include "content/browser/android/browser_surface_texture_manager.h" | 86 #include "content/browser/android/browser_surface_texture_manager.h" |
87 #include "content/browser/android/tracing_controller_android.h" | 87 #include "content/browser/android/tracing_controller_android.h" |
88 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 88 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
89 #include "content/public/browser/screen_orientation_provider.h" | 89 #include "content/public/browser/screen_orientation_provider.h" |
90 #include "ui/gl/gl_surface.h" | 90 #include "ui/gl/gl_surface.h" |
91 #endif | 91 #endif |
92 | 92 |
93 #if defined(OS_MACOSX) && !defined(OS_IOS) | 93 #if defined(OS_MACOSX) && !defined(OS_IOS) |
94 #include "base/mac/memory_pressure_monitor.h" | 94 #include "base/mac/memory_pressure_monitor.h" |
95 #include "content/browser/bootstrap_sandbox_mac.h" | 95 #include "content/browser/bootstrap_sandbox_mac.h" |
| 96 #include "content/browser/browser_io_surface_manager_mac.h" |
96 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 97 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
97 #include "content/browser/compositor/browser_compositor_view_mac.h" | 98 #include "content/browser/compositor/browser_compositor_view_mac.h" |
98 #include "content/browser/theme_helper_mac.h" | 99 #include "content/browser/theme_helper_mac.h" |
99 #endif | 100 #endif |
100 | 101 |
101 #if defined(OS_WIN) | 102 #if defined(OS_WIN) |
102 #include <windows.h> | 103 #include <windows.h> |
103 #include <commctrl.h> | 104 #include <commctrl.h> |
104 #include <shellapi.h> | 105 #include <shellapi.h> |
105 | 106 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 if (!parsed_command_line_.HasSwitch( | 578 if (!parsed_command_line_.HasSwitch( |
578 switches::kDisableScreenOrientationLock)) { | 579 switches::kDisableScreenOrientationLock)) { |
579 TRACE_EVENT0("startup", | 580 TRACE_EVENT0("startup", |
580 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 581 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
581 screen_orientation_delegate_.reset( | 582 screen_orientation_delegate_.reset( |
582 new ScreenOrientationDelegateAndroid()); | 583 new ScreenOrientationDelegateAndroid()); |
583 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 584 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
584 } | 585 } |
585 #endif | 586 #endif |
586 | 587 |
| 588 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 589 { |
| 590 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); |
| 591 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 592 } |
| 593 #endif |
| 594 |
587 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 595 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
588 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 596 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
589 memory_observer_.reset(new MemoryObserver()); | 597 memory_observer_.reset(new MemoryObserver()); |
590 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 598 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
591 } | 599 } |
592 | 600 |
593 if (parsed_command_line_.HasSwitch( | 601 if (parsed_command_line_.HasSwitch( |
594 switches::kEnableAggressiveDOMStorageFlushing)) { | 602 switches::kEnableAggressiveDOMStorageFlushing)) { |
595 TRACE_EVENT0("startup", | 603 TRACE_EVENT0("startup", |
596 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 604 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1335 |
1328 void BrowserMainLoop::EndStartupTracing() { | 1336 void BrowserMainLoop::EndStartupTracing() { |
1329 is_tracing_startup_ = false; | 1337 is_tracing_startup_ = false; |
1330 TracingController::GetInstance()->DisableRecording( | 1338 TracingController::GetInstance()->DisableRecording( |
1331 TracingController::CreateFileSink( | 1339 TracingController::CreateFileSink( |
1332 startup_trace_file_, | 1340 startup_trace_file_, |
1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1341 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1334 } | 1342 } |
1335 | 1343 |
1336 } // namespace content | 1344 } // namespace content |
OLD | NEW |