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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2902943002: Revert of media: Add experimental feature to enable Mojo CDM on desktop Chromium (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « content/browser/service_manager/service_manager_context.cc ('k') | content/utility/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6757 matching lines...) Expand 10 before | Expand all | Expand 10 after
6768 6768
6769 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 6769 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
6770 media::mojom::RemoterFactory* RenderFrameImpl::GetRemoterFactory() { 6770 media::mojom::RemoterFactory* RenderFrameImpl::GetRemoterFactory() {
6771 if (!remoter_factory_) 6771 if (!remoter_factory_)
6772 GetRemoteInterfaces()->GetInterface(&remoter_factory_); 6772 GetRemoteInterfaces()->GetInterface(&remoter_factory_);
6773 return remoter_factory_.get(); 6773 return remoter_factory_.get();
6774 } 6774 }
6775 #endif 6775 #endif
6776 6776
6777 media::CdmFactory* RenderFrameImpl::GetCdmFactory() { 6777 media::CdmFactory* RenderFrameImpl::GetCdmFactory() {
6778 DCHECK(frame_);
6779
6780 if (cdm_factory_) 6778 if (cdm_factory_)
6781 return cdm_factory_.get(); 6779 return cdm_factory_.get();
6782 6780
6781 #if BUILDFLAG(ENABLE_MOJO_CDM)
6782 cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceProvider()));
6783 return cdm_factory_.get();
6784 #endif // BUILDFLAG(ENABLE_MOJO_CDM)
6785
6783 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 6786 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
6784 static_assert(BUILDFLAG(ENABLE_MOJO_CDM), 6787 DCHECK(frame_);
6785 "Mojo CDM should always be enabled when PPAPI CDM is enabled"); 6788 cdm_factory_.reset(
6786 if (base::FeatureList::IsEnabled(media::kMojoCdm)) { 6789 new RenderCdmFactory(base::Bind(&PepperCdmWrapperImpl::Create, frame_)));
6787 cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceProvider()));
6788 } else {
6789 cdm_factory_.reset(new RenderCdmFactory(
6790 base::Bind(&PepperCdmWrapperImpl::Create, frame_)));
6791 }
6792 #elif BUILDFLAG(ENABLE_MOJO_CDM)
6793 cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceProvider()));
6794 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) 6790 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
6795 6791
6796 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 6792 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
6797 cdm_factory_.reset(new media::remoting::RemotingCdmFactory( 6793 cdm_factory_.reset(new media::remoting::RemotingCdmFactory(
6798 std::move(cdm_factory_), GetRemoterFactory(), 6794 std::move(cdm_factory_), GetRemoterFactory(),
6799 std::move(remoting_sink_observer_))); 6795 std::move(remoting_sink_observer_)));
6800 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 6796 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
6801 6797
6802 return cdm_factory_.get(); 6798 return cdm_factory_.get();
6803 } 6799 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
7078 policy(info.default_policy), 7074 policy(info.default_policy),
7079 replaces_current_history_item(info.replaces_current_history_item), 7075 replaces_current_history_item(info.replaces_current_history_item),
7080 history_navigation_in_new_child_frame( 7076 history_navigation_in_new_child_frame(
7081 info.is_history_navigation_in_new_child_frame), 7077 info.is_history_navigation_in_new_child_frame),
7082 client_redirect(info.is_client_redirect), 7078 client_redirect(info.is_client_redirect),
7083 cache_disabled(info.is_cache_disabled), 7079 cache_disabled(info.is_cache_disabled),
7084 form(info.form), 7080 form(info.form),
7085 source_location(info.source_location) {} 7081 source_location(info.source_location) {}
7086 7082
7087 } // namespace content 7083 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_manager/service_manager_context.cc ('k') | content/utility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698