| 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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.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_mac.h" | 94 #include "base/mac/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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 if (!parsed_command_line_.HasSwitch( | 602 if (!parsed_command_line_.HasSwitch( |
| 602 switches::kDisableScreenOrientationLock)) { | 603 switches::kDisableScreenOrientationLock)) { |
| 603 TRACE_EVENT0("startup", | 604 TRACE_EVENT0("startup", |
| 604 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 605 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 605 screen_orientation_delegate_.reset( | 606 screen_orientation_delegate_.reset( |
| 606 new ScreenOrientationDelegateAndroid()); | 607 new ScreenOrientationDelegateAndroid()); |
| 607 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 608 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 608 } | 609 } |
| 609 #endif | 610 #endif |
| 610 | 611 |
| 612 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 613 { |
| 614 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); |
| 615 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 616 } |
| 617 #endif |
| 618 |
| 611 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 619 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 612 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 620 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
| 613 memory_observer_.reset(new MemoryObserver()); | 621 memory_observer_.reset(new MemoryObserver()); |
| 614 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 622 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 615 } | 623 } |
| 616 | 624 |
| 617 if (parsed_command_line_.HasSwitch( | 625 if (parsed_command_line_.HasSwitch( |
| 618 switches::kEnableAggressiveDOMStorageFlushing)) { | 626 switches::kEnableAggressiveDOMStorageFlushing)) { |
| 619 TRACE_EVENT0("startup", | 627 TRACE_EVENT0("startup", |
| 620 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 628 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 | 1359 |
| 1352 void BrowserMainLoop::EndStartupTracing() { | 1360 void BrowserMainLoop::EndStartupTracing() { |
| 1353 is_tracing_startup_ = false; | 1361 is_tracing_startup_ = false; |
| 1354 TracingController::GetInstance()->DisableRecording( | 1362 TracingController::GetInstance()->DisableRecording( |
| 1355 TracingController::CreateFileSink( | 1363 TracingController::CreateFileSink( |
| 1356 startup_trace_file_, | 1364 startup_trace_file_, |
| 1357 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1365 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1358 } | 1366 } |
| 1359 | 1367 |
| 1360 } // namespace content | 1368 } // namespace content |
| OLD | NEW |