| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #if defined(USE_AURA) | 101 #if defined(USE_AURA) |
| 102 #include "content/public/browser/context_factory.h" | 102 #include "content/public/browser/context_factory.h" |
| 103 #include "ui/aura/env.h" | 103 #include "ui/aura/env.h" |
| 104 #endif | 104 #endif |
| 105 | 105 |
| 106 #if defined(OS_ANDROID) | 106 #if defined(OS_ANDROID) |
| 107 #include "base/android/jni_android.h" | 107 #include "base/android/jni_android.h" |
| 108 #include "components/tracing/common/graphics_memory_dump_provider_android.h" | 108 #include "components/tracing/common/graphics_memory_dump_provider_android.h" |
| 109 #include "content/browser/android/browser_startup_controller.h" | 109 #include "content/browser/android/browser_startup_controller.h" |
| 110 #include "content/browser/android/browser_surface_texture_manager.h" | 110 #include "content/browser/android/browser_surface_texture_manager.h" |
| 111 #include "content/browser/android/scoped_surface_request_manager.h" |
| 111 #include "content/browser/android/tracing_controller_android.h" | 112 #include "content/browser/android/tracing_controller_android.h" |
| 112 #include "content/browser/media/android/browser_media_player_manager.h" | 113 #include "content/browser/media/android/browser_media_player_manager.h" |
| 113 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" | 114 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" |
| 114 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 115 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
| 115 #include "content/public/browser/screen_orientation_provider.h" | 116 #include "content/public/browser/screen_orientation_provider.h" |
| 116 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" | 117 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" |
| 117 #include "media/base/android/media_client_android.h" | 118 #include "media/base/android/media_client_android.h" |
| 118 #include "ui/gl/gl_surface.h" | 119 #include "ui/gl/gl_surface.h" |
| 119 #endif | 120 #endif |
| 120 | 121 |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); | 623 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); |
| 623 InitStartupTracingForDuration(parsed_command_line_); | 624 InitStartupTracingForDuration(parsed_command_line_); |
| 624 } | 625 } |
| 625 | 626 |
| 626 #if defined(OS_ANDROID) | 627 #if defined(OS_ANDROID) |
| 627 { | 628 { |
| 628 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); | 629 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
| 629 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 630 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 630 gpu::SurfaceTextureManager::SetInstance( | 631 gpu::SurfaceTextureManager::SetInstance( |
| 631 gpu::InProcessSurfaceTextureManager::GetInstance()); | 632 gpu::InProcessSurfaceTextureManager::GetInstance()); |
| 633 gpu::ScopedSurfaceRequestConduit::SetInstance( |
| 634 ScopedSurfaceRequestManager::GetInstance()); |
| 632 } else { | 635 } else { |
| 633 gpu::SurfaceTextureManager::SetInstance( | 636 gpu::SurfaceTextureManager::SetInstance( |
| 634 BrowserSurfaceTextureManager::GetInstance()); | 637 BrowserSurfaceTextureManager::GetInstance()); |
| 635 } | 638 } |
| 636 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); | 639 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); |
| 637 } | 640 } |
| 638 | 641 |
| 639 if (!parsed_command_line_.HasSwitch( | 642 if (!parsed_command_line_.HasSwitch( |
| 640 switches::kDisableScreenOrientationLock)) { | 643 switches::kDisableScreenOrientationLock)) { |
| 641 TRACE_EVENT0("startup", | 644 TRACE_EVENT0("startup", |
| 642 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 645 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 643 screen_orientation_delegate_.reset( | 646 screen_orientation_delegate_.reset( |
| 644 new ScreenOrientationDelegateAndroid()); | 647 new ScreenOrientationDelegateAndroid()); |
| 645 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 648 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 646 } | 649 } |
| 647 #endif | 650 #endif |
| 648 | 651 |
| 649 #if defined(OS_MACOSX) | 652 #if defined(OS_MACOSX) |
| 650 if (BootstrapSandboxManager::ShouldEnable()) { | 653 if (BootstrapSandboxManager::ShouldEnable()) { |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1536 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1534 audio_thread_->task_runner(); | 1537 audio_thread_->task_runner(); |
| 1535 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1538 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1536 std::move(worker_task_runner), | 1539 std::move(worker_task_runner), |
| 1537 MediaInternals::GetInstance()); | 1540 MediaInternals::GetInstance()); |
| 1538 } | 1541 } |
| 1539 CHECK(audio_manager_); | 1542 CHECK(audio_manager_); |
| 1540 } | 1543 } |
| 1541 | 1544 |
| 1542 } // namespace content | 1545 } // namespace content |
| OLD | NEW |