Chromium Code Reviews| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 | 106 |
| 107 #if defined(USE_AURA) | 107 #if defined(USE_AURA) |
| 108 #include "content/public/browser/context_factory.h" | 108 #include "content/public/browser/context_factory.h" |
| 109 #include "ui/aura/env.h" | 109 #include "ui/aura/env.h" |
| 110 #endif | 110 #endif |
| 111 | 111 |
| 112 #if defined(OS_ANDROID) | 112 #if defined(OS_ANDROID) |
| 113 #include "base/android/jni_android.h" | 113 #include "base/android/jni_android.h" |
| 114 #include "components/tracing/common/graphics_memory_dump_provider_android.h" | 114 #include "components/tracing/common/graphics_memory_dump_provider_android.h" |
| 115 #include "content/browser/android/browser_startup_controller.h" | 115 #include "content/browser/android/browser_startup_controller.h" |
| 116 #include "content/browser/android/browser_surface_texture_manager.h" | |
| 117 #include "content/browser/android/scoped_surface_request_manager.h" | 116 #include "content/browser/android/scoped_surface_request_manager.h" |
| 118 #include "content/browser/android/tracing_controller_android.h" | 117 #include "content/browser/android/tracing_controller_android.h" |
| 119 #include "content/browser/media/android/browser_media_player_manager.h" | 118 #include "content/browser/media/android/browser_media_player_manager.h" |
| 120 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" | 119 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" |
| 121 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" | 120 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" |
| 122 #include "content/public/browser/screen_orientation_provider.h" | 121 #include "content/public/browser/screen_orientation_provider.h" |
| 123 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" | |
| 124 #include "media/base/android/media_client_android.h" | 122 #include "media/base/android/media_client_android.h" |
| 125 #include "ui/gl/gl_surface.h" | 123 #include "ui/gl/gl_surface.h" |
| 126 #endif | 124 #endif |
| 127 | 125 |
| 128 #if defined(OS_MACOSX) | 126 #if defined(OS_MACOSX) |
| 129 #include "base/memory/memory_pressure_monitor_mac.h" | 127 #include "base/memory/memory_pressure_monitor_mac.h" |
| 130 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 128 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
| 131 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 129 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 132 #include "content/browser/mach_broker_mac.h" | 130 #include "content/browser/mach_broker_mac.h" |
| 133 #include "content/browser/renderer_host/browser_compositor_view_mac.h" | 131 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 // starting the main message loop to avoid calling | 664 // starting the main message loop to avoid calling |
| 667 // MessagePumpForUI::ScheduleWork() before MessagePumpForUI::Start() as it | 665 // MessagePumpForUI::ScheduleWork() before MessagePumpForUI::Start() as it |
| 668 // will crash the browser. | 666 // will crash the browser. |
| 669 if (is_tracing_startup_for_duration_) { | 667 if (is_tracing_startup_for_duration_) { |
| 670 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); | 668 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); |
| 671 InitStartupTracingForDuration(parsed_command_line_); | 669 InitStartupTracingForDuration(parsed_command_line_); |
| 672 } | 670 } |
| 673 | 671 |
| 674 #if defined(OS_ANDROID) | 672 #if defined(OS_ANDROID) |
| 675 { | 673 { |
| 676 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); | 674 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
|
tguilbert
2016/11/23 19:58:15
Any suggestions as to what this should be updated
| |
| 677 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { | 675 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { |
| 678 gpu::SurfaceTextureManager::SetInstance( | |
| 679 gpu::InProcessSurfaceTextureManager::GetInstance()); | |
| 680 gpu::ScopedSurfaceRequestConduit::SetInstance( | 676 gpu::ScopedSurfaceRequestConduit::SetInstance( |
| 681 ScopedSurfaceRequestManager::GetInstance()); | 677 ScopedSurfaceRequestManager::GetInstance()); |
| 682 } else { | |
| 683 gpu::SurfaceTextureManager::SetInstance( | |
| 684 BrowserSurfaceTextureManager::GetInstance()); | |
| 685 } | 678 } |
| 686 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); | 679 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); |
| 687 } | 680 } |
| 688 | 681 |
| 689 if (!parsed_command_line_.HasSwitch( | 682 if (!parsed_command_line_.HasSwitch( |
| 690 switches::kDisableScreenOrientationLock)) { | 683 switches::kDisableScreenOrientationLock)) { |
| 691 TRACE_EVENT0("startup", | 684 TRACE_EVENT0("startup", |
| 692 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 685 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 693 screen_orientation_delegate_.reset( | 686 screen_orientation_delegate_.reset( |
| 694 new ScreenOrientationDelegateAndroid()); | 687 new ScreenOrientationDelegateAndroid()); |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1620 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1613 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1621 audio_thread_->task_runner(); | 1614 audio_thread_->task_runner(); |
| 1622 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1615 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1623 std::move(worker_task_runner), | 1616 std::move(worker_task_runner), |
| 1624 MediaInternals::GetInstance()); | 1617 MediaInternals::GetInstance()); |
| 1625 } | 1618 } |
| 1626 CHECK(audio_manager_); | 1619 CHECK(audio_manager_); |
| 1627 } | 1620 } |
| 1628 | 1621 |
| 1629 } // namespace content | 1622 } // namespace content |
| OLD | NEW |