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 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #if defined(USE_AURA) | 97 #if defined(USE_AURA) |
98 #include "content/public/browser/context_factory.h" | 98 #include "content/public/browser/context_factory.h" |
99 #include "ui/aura/env.h" | 99 #include "ui/aura/env.h" |
100 #endif | 100 #endif |
101 | 101 |
102 #if defined(OS_ANDROID) | 102 #if defined(OS_ANDROID) |
103 #include "base/android/jni_android.h" | 103 #include "base/android/jni_android.h" |
104 #include "components/tracing/graphics_memory_dump_provider_android.h" | 104 #include "components/tracing/graphics_memory_dump_provider_android.h" |
105 #include "content/browser/android/browser_startup_controller.h" | 105 #include "content/browser/android/browser_startup_controller.h" |
106 #include "content/browser/android/browser_surface_texture_manager.h" | 106 #include "content/browser/android/browser_surface_texture_manager.h" |
107 #include "content/browser/android/in_process_surface_texture_manager.h" | |
108 #include "content/browser/android/tracing_controller_android.h" | 107 #include "content/browser/android/tracing_controller_android.h" |
| 108 #include "content/browser/media/android/browser_media_player_manager.h" |
109 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 109 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
110 #include "content/public/browser/screen_orientation_provider.h" | 110 #include "content/public/browser/screen_orientation_provider.h" |
| 111 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" |
111 #include "ui/gl/gl_surface.h" | 112 #include "ui/gl/gl_surface.h" |
112 #endif | 113 #endif |
113 | 114 |
114 #if defined(OS_MACOSX) | 115 #if defined(OS_MACOSX) |
115 #include "base/memory/memory_pressure_monitor_mac.h" | 116 #include "base/memory/memory_pressure_monitor_mac.h" |
116 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 117 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
117 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 118 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
118 #include "content/browser/mach_broker_mac.h" | 119 #include "content/browser/mach_broker_mac.h" |
119 #include "content/browser/renderer_host/browser_compositor_view_mac.h" | 120 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
120 #include "content/browser/theme_helper_mac.h" | 121 #include "content/browser/theme_helper_mac.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 if (is_tracing_startup_for_duration_) { | 643 if (is_tracing_startup_for_duration_) { |
643 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); | 644 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); |
644 InitStartupTracingForDuration(parsed_command_line_); | 645 InitStartupTracingForDuration(parsed_command_line_); |
645 } | 646 } |
646 | 647 |
647 #if defined(OS_ANDROID) | 648 #if defined(OS_ANDROID) |
648 { | 649 { |
649 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); | 650 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
650 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 651 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
651 gpu::SurfaceTextureManager::SetInstance( | 652 gpu::SurfaceTextureManager::SetInstance( |
652 InProcessSurfaceTextureManager::GetInstance()); | 653 gpu::InProcessSurfaceTextureManager::GetInstance()); |
653 } else { | 654 } else { |
654 gpu::SurfaceTextureManager::SetInstance( | 655 gpu::SurfaceTextureManager::SetInstance( |
655 BrowserSurfaceTextureManager::GetInstance()); | 656 BrowserSurfaceTextureManager::GetInstance()); |
656 } | 657 } |
| 658 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); |
657 } | 659 } |
658 | 660 |
659 if (!parsed_command_line_.HasSwitch( | 661 if (!parsed_command_line_.HasSwitch( |
660 switches::kDisableScreenOrientationLock)) { | 662 switches::kDisableScreenOrientationLock)) { |
661 TRACE_EVENT0("startup", | 663 TRACE_EVENT0("startup", |
662 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 664 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
663 screen_orientation_delegate_.reset( | 665 screen_orientation_delegate_.reset( |
664 new ScreenOrientationDelegateAndroid()); | 666 new ScreenOrientationDelegateAndroid()); |
665 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 667 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
666 } | 668 } |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 std::move(worker_task_runner), | 1519 std::move(worker_task_runner), |
1518 MediaInternals::GetInstance()); | 1520 MediaInternals::GetInstance()); |
1519 } | 1521 } |
1520 CHECK(audio_manager_); | 1522 CHECK(audio_manager_); |
1521 | 1523 |
1522 if (use_hang_monitor) | 1524 if (use_hang_monitor) |
1523 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1525 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
1524 } | 1526 } |
1525 | 1527 |
1526 } // namespace content | 1528 } // namespace content |
OLD | NEW |