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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2161083004: [DO NOT COMMIT] MediaPlayerRenderer using StreamTextures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "content/public/browser/user_metrics.h" 74 #include "content/public/browser/user_metrics.h"
75 #include "content/public/common/browser_side_navigation_policy.h" 75 #include "content/public/common/browser_side_navigation_policy.h"
76 #include "content/public/common/content_constants.h" 76 #include "content/public/common/content_constants.h"
77 #include "content/public/common/content_switches.h" 77 #include "content/public/common/content_switches.h"
78 #include "content/public/common/file_chooser_file_info.h" 78 #include "content/public/common/file_chooser_file_info.h"
79 #include "content/public/common/file_chooser_params.h" 79 #include "content/public/common/file_chooser_params.h"
80 #include "content/public/common/isolated_world_ids.h" 80 #include "content/public/common/isolated_world_ids.h"
81 #include "content/public/common/url_constants.h" 81 #include "content/public/common/url_constants.h"
82 #include "content/public/common/url_utils.h" 82 #include "content/public/common/url_utils.h"
83 #include "device/vibration/vibration_manager_impl.h" 83 #include "device/vibration/vibration_manager_impl.h"
84 #include "media/media_features.h"
84 #include "services/shell/public/cpp/interface_provider.h" 85 #include "services/shell/public/cpp/interface_provider.h"
85 #include "ui/accessibility/ax_tree.h" 86 #include "ui/accessibility/ax_tree.h"
86 #include "ui/accessibility/ax_tree_update.h" 87 #include "ui/accessibility/ax_tree_update.h"
87 #include "ui/gfx/geometry/quad_f.h" 88 #include "ui/gfx/geometry/quad_f.h"
88 #include "url/gurl.h" 89 #include "url/gurl.h"
89 90
90 #if defined(OS_ANDROID) 91 #if defined(OS_ANDROID)
91 #include "content/browser/mojo/service_registrar_android.h" 92 #include "content/browser/mojo/service_registrar_android.h"
92 #endif 93 #endif
93 94
95 #if BUILDFLAG(FORCE_MOJO_MEDIA_PLAYER_RENDERER)
96 #include "media/mojo/services/mojo_media_player_renderer_helper.h"
97 #endif
98
94 #if defined(OS_MACOSX) 99 #if defined(OS_MACOSX)
95 #include "content/browser/frame_host/popup_menu_helper_mac.h" 100 #include "content/browser/frame_host/popup_menu_helper_mac.h"
96 #endif 101 #endif
97 102
98 #if defined(ENABLE_WEBVR) 103 #if defined(ENABLE_WEBVR)
99 #include "base/command_line.h" 104 #include "base/command_line.h"
100 #include "content/public/common/content_switches.h" 105 #include "content/public/common/content_switches.h"
101 #include "device/vr/vr_device_manager.h" // nogncheck 106 #include "device/vr/vr_device_manager.h" // nogncheck
102 #endif 107 #endif
103 108
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 #if defined(ENABLE_WEBVR) 2071 #if defined(ENABLE_WEBVR)
2067 const base::CommandLine& browser_command_line = 2072 const base::CommandLine& browser_command_line =
2068 *base::CommandLine::ForCurrentProcess(); 2073 *base::CommandLine::ForCurrentProcess();
2069 2074
2070 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 2075 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
2071 GetInterfaceRegistry()->AddInterface<device::VRService>( 2076 GetInterfaceRegistry()->AddInterface<device::VRService>(
2072 base::Bind(&device::VRDeviceManager::BindRequest)); 2077 base::Bind(&device::VRDeviceManager::BindRequest));
2073 } 2078 }
2074 #endif 2079 #endif
2075 2080
2081 #if BUILDFLAG(FORCE_MOJO_MEDIA_PLAYER_RENDERER)
2082 // This service creates a MojoRendererService, passing it a MediaPlayerRender.
2083 // TODO(tguilbert): For reviewers: is there a need for disambiguating the
2084 // mojom::Renderer service at a RenderFrameHost level?
2085 GetInterfaceRegistry()->AddInterface<media::mojom::Renderer>(base::Bind(
2086 &media::MojoMediaPlayerRendererHelper::CreateMediaPlayerRenderer,
2087 base::Unretained(this)));
2088 #endif
2089
2076 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( 2090 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
2077 GetInterfaceRegistry(), this); 2091 GetInterfaceRegistry(), this);
2078 } 2092 }
2079 2093
2080 void RenderFrameHostImpl::ResetWaitingState() { 2094 void RenderFrameHostImpl::ResetWaitingState() {
2081 DCHECK(is_active()); 2095 DCHECK(is_active());
2082 2096
2083 // The active state of the RVH is determined by its main frame, since 2097 // The active state of the RVH is determined by its main frame, since
2084 // subframes should have their own widgets. 2098 // subframes should have their own widgets.
2085 if (frame_tree_node_->IsMainFrame()) { 2099 if (frame_tree_node_->IsMainFrame()) {
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2982 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2969 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2983 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2970 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2984 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2971 } 2985 }
2972 2986
2973 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2987 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2974 web_bluetooth_service_.reset(); 2988 web_bluetooth_service_.reset();
2975 } 2989 }
2976 2990
2977 } // namespace content 2991 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698