Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2285593002: Add ScopedSurfaceRequestManager (Closed)
Patch Set: Addressing comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 #if defined(USE_AURA) 102 #if defined(USE_AURA)
103 #include "content/public/browser/context_factory.h" 103 #include "content/public/browser/context_factory.h"
104 #include "ui/aura/env.h" 104 #include "ui/aura/env.h"
105 #endif 105 #endif
106 106
107 #if defined(OS_ANDROID) 107 #if defined(OS_ANDROID)
108 #include "base/android/jni_android.h" 108 #include "base/android/jni_android.h"
109 #include "components/tracing/common/graphics_memory_dump_provider_android.h" 109 #include "components/tracing/common/graphics_memory_dump_provider_android.h"
110 #include "content/browser/android/browser_startup_controller.h" 110 #include "content/browser/android/browser_startup_controller.h"
111 #include "content/browser/android/browser_surface_texture_manager.h" 111 #include "content/browser/android/browser_surface_texture_manager.h"
112 #include "content/browser/android/scoped_surface_request_manager.h"
112 #include "content/browser/android/tracing_controller_android.h" 113 #include "content/browser/android/tracing_controller_android.h"
113 #include "content/browser/media/android/browser_media_player_manager.h" 114 #include "content/browser/media/android/browser_media_player_manager.h"
114 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" 115 #include "content/browser/renderer_host/context_provider_factory_impl_android.h"
115 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" 116 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h"
116 #include "content/public/browser/screen_orientation_provider.h" 117 #include "content/public/browser/screen_orientation_provider.h"
117 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h" 118 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
118 #include "media/base/android/media_client_android.h" 119 #include "media/base/android/media_client_android.h"
119 #include "ui/gl/gl_surface.h" 120 #include "ui/gl/gl_surface.h"
120 #endif 121 #endif
121 122
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); 624 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration");
624 InitStartupTracingForDuration(parsed_command_line_); 625 InitStartupTracingForDuration(parsed_command_line_);
625 } 626 }
626 627
627 #if defined(OS_ANDROID) 628 #if defined(OS_ANDROID)
628 { 629 {
629 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); 630 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager");
630 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { 631 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
631 gpu::SurfaceTextureManager::SetInstance( 632 gpu::SurfaceTextureManager::SetInstance(
632 gpu::InProcessSurfaceTextureManager::GetInstance()); 633 gpu::InProcessSurfaceTextureManager::GetInstance());
634 gpu::ScopedSurfaceRequestConduit::SetInstance(
635 ScopedSurfaceRequestManager::GetInstance());
633 } else { 636 } else {
634 gpu::SurfaceTextureManager::SetInstance( 637 gpu::SurfaceTextureManager::SetInstance(
635 BrowserSurfaceTextureManager::GetInstance()); 638 BrowserSurfaceTextureManager::GetInstance());
636 } 639 }
637 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); 640 BrowserMediaPlayerManager::InitSurfaceTexturePeer();
638 } 641 }
639 642
640 if (!parsed_command_line_.HasSwitch( 643 if (!parsed_command_line_.HasSwitch(
641 switches::kDisableScreenOrientationLock)) { 644 switches::kDisableScreenOrientationLock)) {
642 TRACE_EVENT0("startup", 645 TRACE_EVENT0("startup",
643 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); 646 "BrowserMainLoop::Subsystem:ScreenOrientationProvider");
644 screen_orientation_delegate_.reset( 647 screen_orientation_delegate_.reset(
645 new ScreenOrientationDelegateAndroid()); 648 new ScreenOrientationDelegateAndroid());
646 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); 649 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get());
647 } 650 }
648 #endif 651 #endif
649 652
650 #if defined(OS_MACOSX) 653 #if defined(OS_MACOSX)
651 if (BootstrapSandboxManager::ShouldEnable()) { 654 if (BootstrapSandboxManager::ShouldEnable()) {
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1549 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1547 audio_thread_->task_runner(); 1550 audio_thread_->task_runner();
1548 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1551 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1549 std::move(worker_task_runner), 1552 std::move(worker_task_runner),
1550 MediaInternals::GetInstance()); 1553 MediaInternals::GetInstance());
1551 } 1554 }
1552 CHECK(audio_manager_); 1555 CHECK(audio_manager_);
1553 } 1556 }
1554 1557
1555 } // namespace content 1558 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698