| 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/memory/memory_pressure_monitor_mac.h" | 94 #include "base/memory/memory_pressure_monitor_mac.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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 if (!parsed_command_line_.HasSwitch( | 580 if (!parsed_command_line_.HasSwitch( |
| 580 switches::kDisableScreenOrientationLock)) { | 581 switches::kDisableScreenOrientationLock)) { |
| 581 TRACE_EVENT0("startup", | 582 TRACE_EVENT0("startup", |
| 582 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 583 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 583 screen_orientation_delegate_.reset( | 584 screen_orientation_delegate_.reset( |
| 584 new ScreenOrientationDelegateAndroid()); | 585 new ScreenOrientationDelegateAndroid()); |
| 585 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 586 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 586 } | 587 } |
| 587 #endif | 588 #endif |
| 588 | 589 |
| 590 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 591 { |
| 592 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); |
| 593 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 594 } |
| 595 #endif |
| 596 |
| 589 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 597 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 590 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 598 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
| 591 memory_observer_.reset(new MemoryObserver()); | 599 memory_observer_.reset(new MemoryObserver()); |
| 592 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 600 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 593 } | 601 } |
| 594 | 602 |
| 595 if (parsed_command_line_.HasSwitch( | 603 if (parsed_command_line_.HasSwitch( |
| 596 switches::kEnableAggressiveDOMStorageFlushing)) { | 604 switches::kEnableAggressiveDOMStorageFlushing)) { |
| 597 TRACE_EVENT0("startup", | 605 TRACE_EVENT0("startup", |
| 598 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 606 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 | 1337 |
| 1330 void BrowserMainLoop::EndStartupTracing() { | 1338 void BrowserMainLoop::EndStartupTracing() { |
| 1331 is_tracing_startup_ = false; | 1339 is_tracing_startup_ = false; |
| 1332 TracingController::GetInstance()->DisableRecording( | 1340 TracingController::GetInstance()->DisableRecording( |
| 1333 TracingController::CreateFileSink( | 1341 TracingController::CreateFileSink( |
| 1334 startup_trace_file_, | 1342 startup_trace_file_, |
| 1335 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1343 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1336 } | 1344 } |
| 1337 | 1345 |
| 1338 } // namespace content | 1346 } // namespace content |
| OLD | NEW |