| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #include "content/browser/android/in_process_surface_texture_manager.h" | 104 #include "content/browser/android/in_process_surface_texture_manager.h" |
| 105 #include "content/browser/android/tracing_controller_android.h" | 105 #include "content/browser/android/tracing_controller_android.h" |
| 106 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 106 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
| 107 #include "content/public/browser/screen_orientation_provider.h" | 107 #include "content/public/browser/screen_orientation_provider.h" |
| 108 #include "ui/gl/gl_surface.h" | 108 #include "ui/gl/gl_surface.h" |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 #if defined(OS_MACOSX) && !defined(OS_IOS) | 111 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 112 #include "base/memory/memory_pressure_monitor_mac.h" | 112 #include "base/memory/memory_pressure_monitor_mac.h" |
| 113 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 113 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
| 114 #include "content/browser/browser_io_surface_manager_mac.h" | |
| 115 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 114 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 116 #include "content/browser/compositor/browser_compositor_view_mac.h" | 115 #include "content/browser/compositor/browser_compositor_view_mac.h" |
| 117 #include "content/browser/in_process_io_surface_manager_mac.h" | |
| 118 #include "content/browser/theme_helper_mac.h" | 116 #include "content/browser/theme_helper_mac.h" |
| 119 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 117 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
| 120 #endif | 118 #endif |
| 121 | 119 |
| 122 #if defined(USE_OZONE) | 120 #if defined(USE_OZONE) |
| 123 #include "ui/ozone/public/client_native_pixmap_factory.h" | 121 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 124 #include "ui/ozone/public/ozone_platform.h" | 122 #include "ui/ozone/public/ozone_platform.h" |
| 125 #endif | 123 #endif |
| 126 | 124 |
| 127 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 TRACE_EVENT0("startup", | 653 TRACE_EVENT0("startup", |
| 656 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 654 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 657 screen_orientation_delegate_.reset( | 655 screen_orientation_delegate_.reset( |
| 658 new ScreenOrientationDelegateAndroid()); | 656 new ScreenOrientationDelegateAndroid()); |
| 659 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 657 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 660 } | 658 } |
| 661 #endif | 659 #endif |
| 662 #endif | 660 #endif |
| 663 | 661 |
| 664 #if defined(OS_MACOSX) && !defined(OS_IOS) | 662 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 665 { | |
| 666 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager"); | |
| 667 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | |
| 668 gfx::IOSurfaceManager::SetInstance( | |
| 669 InProcessIOSurfaceManager::GetInstance()); | |
| 670 } else { | |
| 671 gfx::IOSurfaceManager::SetInstance( | |
| 672 BrowserIOSurfaceManager::GetInstance()); | |
| 673 } | |
| 674 } | |
| 675 | |
| 676 if (BootstrapSandboxManager::ShouldEnable()) { | 663 if (BootstrapSandboxManager::ShouldEnable()) { |
| 677 TRACE_EVENT0("startup", | 664 TRACE_EVENT0("startup", |
| 678 "BrowserMainLoop::Subsystem:BootstrapSandbox"); | 665 "BrowserMainLoop::Subsystem:BootstrapSandbox"); |
| 679 CHECK(BootstrapSandboxManager::GetInstance()); | 666 CHECK(BootstrapSandboxManager::GetInstance()); |
| 680 } | 667 } |
| 681 #endif | 668 #endif |
| 682 | 669 |
| 683 #if defined(USE_OZONE) | 670 #if defined(USE_OZONE) |
| 684 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 671 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
| 685 ui::ClientNativePixmapFactory::SetInstance( | 672 ui::ClientNativePixmapFactory::SetInstance( |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 DCHECK(is_tracing_startup_for_duration_); | 1462 DCHECK(is_tracing_startup_for_duration_); |
| 1476 | 1463 |
| 1477 is_tracing_startup_for_duration_ = false; | 1464 is_tracing_startup_for_duration_ = false; |
| 1478 TracingController::GetInstance()->StopTracing( | 1465 TracingController::GetInstance()->StopTracing( |
| 1479 TracingController::CreateFileSink( | 1466 TracingController::CreateFileSink( |
| 1480 startup_trace_file_, | 1467 startup_trace_file_, |
| 1481 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1482 } | 1469 } |
| 1483 | 1470 |
| 1484 } // namespace content | 1471 } // namespace content |
| OLD | NEW |