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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) | 93 #if defined(OS_MACOSX) |
94 #include "media/base/mac/avfoundation_glue.h" | 94 #include "media/base/mac/avfoundation_glue.h" |
95 #endif | 95 #endif |
96 | 96 |
97 #if defined(OS_MACOSX) && !defined(OS_IOS) | 97 #if defined(OS_MACOSX) && !defined(OS_IOS) |
98 #include "base/memory/memory_pressure_monitor_mac.h" | 98 #include "base/memory/memory_pressure_monitor_mac.h" |
99 #include "content/browser/bootstrap_sandbox_mac.h" | 99 #include "content/browser/bootstrap_sandbox_mac.h" |
| 100 #include "content/browser/browser_io_surface_manager_mac.h" |
100 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 101 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
101 #include "content/browser/compositor/browser_compositor_view_mac.h" | 102 #include "content/browser/compositor/browser_compositor_view_mac.h" |
102 #include "content/browser/theme_helper_mac.h" | 103 #include "content/browser/theme_helper_mac.h" |
103 #endif | 104 #endif |
104 | 105 |
105 #if defined(OS_WIN) | 106 #if defined(OS_WIN) |
106 #include <windows.h> | 107 #include <windows.h> |
107 #include <commctrl.h> | 108 #include <commctrl.h> |
108 #include <shellapi.h> | 109 #include <shellapi.h> |
109 | 110 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 if (!parsed_command_line_.HasSwitch( | 593 if (!parsed_command_line_.HasSwitch( |
593 switches::kDisableScreenOrientationLock)) { | 594 switches::kDisableScreenOrientationLock)) { |
594 TRACE_EVENT0("startup", | 595 TRACE_EVENT0("startup", |
595 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 596 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
596 screen_orientation_delegate_.reset( | 597 screen_orientation_delegate_.reset( |
597 new ScreenOrientationDelegateAndroid()); | 598 new ScreenOrientationDelegateAndroid()); |
598 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 599 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
599 } | 600 } |
600 #endif | 601 #endif |
601 | 602 |
| 603 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 604 { |
| 605 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); |
| 606 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 607 } |
| 608 #endif |
| 609 |
602 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 610 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
603 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 611 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
604 memory_observer_.reset(new MemoryObserver()); | 612 memory_observer_.reset(new MemoryObserver()); |
605 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 613 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
606 } | 614 } |
607 | 615 |
608 if (parsed_command_line_.HasSwitch( | 616 if (parsed_command_line_.HasSwitch( |
609 switches::kEnableAggressiveDOMStorageFlushing)) { | 617 switches::kEnableAggressiveDOMStorageFlushing)) { |
610 TRACE_EVENT0("startup", | 618 TRACE_EVENT0("startup", |
611 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 619 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 DCHECK(is_tracing_startup_); | 1362 DCHECK(is_tracing_startup_); |
1355 | 1363 |
1356 is_tracing_startup_ = false; | 1364 is_tracing_startup_ = false; |
1357 TracingController::GetInstance()->DisableRecording( | 1365 TracingController::GetInstance()->DisableRecording( |
1358 TracingController::CreateFileSink( | 1366 TracingController::CreateFileSink( |
1359 startup_trace_file_, | 1367 startup_trace_file_, |
1360 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1368 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1361 } | 1369 } |
1362 | 1370 |
1363 } // namespace content | 1371 } // namespace content |
OLD | NEW |