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

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

Issue 2380743004: media: Remove Browser CDM implementation (Closed)
Patch Set: media: Remove Browser CDM implementation Created 4 years, 2 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/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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 #include "content/renderer/media/android/stream_texture_factory.h" 223 #include "content/renderer/media/android/stream_texture_factory.h"
224 #include "content/renderer/media/android/webmediaplayer_android.h" 224 #include "content/renderer/media/android/webmediaplayer_android.h"
225 #include "content/renderer/media/android/webmediasession_android.h" 225 #include "content/renderer/media/android/webmediasession_android.h"
226 #include "media/base/android/media_codec_util.h" 226 #include "media/base/android/media_codec_util.h"
227 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 227 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
228 #endif 228 #endif
229 229
230 #if defined(ENABLE_PEPPER_CDMS) 230 #if defined(ENABLE_PEPPER_CDMS)
231 #include "content/renderer/media/cdm/pepper_cdm_wrapper_impl.h" 231 #include "content/renderer/media/cdm/pepper_cdm_wrapper_impl.h"
232 #include "content/renderer/media/cdm/render_cdm_factory.h" 232 #include "content/renderer/media/cdm/render_cdm_factory.h"
233 #elif defined(ENABLE_BROWSER_CDMS)
234 #include "content/renderer/media/cdm/render_cdm_factory.h"
235 #include "content/renderer/media/cdm/renderer_cdm_manager.h"
236 #endif 233 #endif
237 234
238 #if defined(ENABLE_MOJO_MEDIA) 235 #if defined(ENABLE_MOJO_MEDIA)
239 #include "content/renderer/media/media_interface_provider.h" 236 #include "content/renderer/media/media_interface_provider.h"
240 #endif 237 #endif
241 238
242 #if defined(ENABLE_MOJO_CDM) 239 #if defined(ENABLE_MOJO_CDM)
243 #include "media/mojo/clients/mojo_cdm_factory.h" // nogncheck 240 #include "media/mojo/clients/mojo_cdm_factory.h" // nogncheck
244 #endif 241 #endif
245 242
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 return false; 813 return false;
817 814
818 // Otherwise enable WMPI if indicated via experiment or command line. 815 // Otherwise enable WMPI if indicated via experiment or command line.
819 return media::IsUnifiedMediaPipelineEnabled(); 816 return media::IsUnifiedMediaPipelineEnabled();
820 } 817 }
821 #endif // defined(OS_ANDROID) 818 #endif // defined(OS_ANDROID)
822 819
823 #if defined(ENABLE_MOJO_CDM) 820 #if defined(ENABLE_MOJO_CDM)
824 // Returns whether mojo CDM should be used at runtime. Note that even when mojo 821 // Returns whether mojo CDM should be used at runtime. Note that even when mojo
825 // CDM is enabled at compile time (ENABLE_MOJO_CDM is defined), there are cases 822 // CDM is enabled at compile time (ENABLE_MOJO_CDM is defined), there are cases
826 // where we want to choose other CDM types. For example, on Android when we use 823 // where we want to choose other CDM types. For example, in the future, when we
827 // WebMediaPlayerAndroid, we still want to use ProxyMediaKeys. In the future, 824 // experiment mojo CDM on desktop, we will choose between mojo CDM and pepper
828 // when we experiment mojo CDM on desktop, we will choose between mojo CDM and 825 // CDM at runtime.
829 // pepper CDM at runtime.
830 // TODO(xhwang): Remove this when we use mojo CDM for all remote CDM cases by 826 // TODO(xhwang): Remove this when we use mojo CDM for all remote CDM cases by
831 // default. 827 // default.
832 bool UseMojoCdm() { 828 bool UseMojoCdm() {
833 #if defined(OS_ANDROID) 829 #if defined(OS_ANDROID)
834 return media::IsUnifiedMediaPipelineEnabled(); 830 return media::IsUnifiedMediaPipelineEnabled();
835 #else 831 #else
836 return true; 832 return true;
837 #endif 833 #endif
838 } 834 }
839 #endif // defined(ENABLE_MOJO_CDM) 835 #endif // defined(ENABLE_MOJO_CDM)
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 cookie_jar_(this), 1051 cookie_jar_(this),
1056 selection_text_offset_(0), 1052 selection_text_offset_(0),
1057 selection_range_(gfx::Range::InvalidRange()), 1053 selection_range_(gfx::Range::InvalidRange()),
1058 handling_select_range_(false), 1054 handling_select_range_(false),
1059 web_user_media_client_(NULL), 1055 web_user_media_client_(NULL),
1060 #if defined(OS_ANDROID) 1056 #if defined(OS_ANDROID)
1061 media_player_manager_(NULL), 1057 media_player_manager_(NULL),
1062 media_session_manager_(NULL), 1058 media_session_manager_(NULL),
1063 #endif 1059 #endif
1064 media_surface_manager_(nullptr), 1060 media_surface_manager_(nullptr),
1065 #if defined(ENABLE_BROWSER_CDMS)
1066 cdm_manager_(NULL),
1067 #endif
1068 devtools_agent_(nullptr), 1061 devtools_agent_(nullptr),
1069 push_messaging_dispatcher_(NULL), 1062 push_messaging_dispatcher_(NULL),
1070 presentation_dispatcher_(NULL), 1063 presentation_dispatcher_(NULL),
1071 screen_orientation_dispatcher_(NULL), 1064 screen_orientation_dispatcher_(NULL),
1072 manifest_manager_(NULL), 1065 manifest_manager_(NULL),
1073 accessibility_mode_(AccessibilityModeOff), 1066 accessibility_mode_(AccessibilityModeOff),
1074 render_accessibility_(NULL), 1067 render_accessibility_(NULL),
1075 media_player_delegate_(NULL), 1068 media_player_delegate_(NULL),
1076 is_using_lofi_(false), 1069 is_using_lofi_(false),
1077 effective_connection_type_( 1070 effective_connection_type_(
(...skipping 5172 matching lines...) Expand 10 before | Expand all | Expand 10 after
6250 if (UseMojoCdm()) { 6243 if (UseMojoCdm()) {
6251 cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceProvider())); 6244 cdm_factory_.reset(new media::MojoCdmFactory(GetMediaInterfaceProvider()));
6252 return cdm_factory_.get(); 6245 return cdm_factory_.get();
6253 } 6246 }
6254 #endif // defined(ENABLE_MOJO_CDM) 6247 #endif // defined(ENABLE_MOJO_CDM)
6255 6248
6256 #if defined(ENABLE_PEPPER_CDMS) 6249 #if defined(ENABLE_PEPPER_CDMS)
6257 DCHECK(frame_); 6250 DCHECK(frame_);
6258 cdm_factory_.reset( 6251 cdm_factory_.reset(
6259 new RenderCdmFactory(base::Bind(&PepperCdmWrapperImpl::Create, frame_))); 6252 new RenderCdmFactory(base::Bind(&PepperCdmWrapperImpl::Create, frame_)));
6260 #elif defined(ENABLE_BROWSER_CDMS)
6261 if (!cdm_manager_)
6262 cdm_manager_ = new RendererCdmManager(this);
6263 cdm_factory_.reset(new RenderCdmFactory(cdm_manager_));
6264 #endif // defined(ENABLE_PEPPER_CDMS) 6253 #endif // defined(ENABLE_PEPPER_CDMS)
6265 6254
6266 return cdm_factory_.get(); 6255 return cdm_factory_.get();
6267 } 6256 }
6268 6257
6269 media::DecoderFactory* RenderFrameImpl::GetDecoderFactory() { 6258 media::DecoderFactory* RenderFrameImpl::GetDecoderFactory() {
6270 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER) 6259 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER)
6271 if (!decoder_factory_) { 6260 if (!decoder_factory_) {
6272 decoder_factory_.reset( 6261 decoder_factory_.reset(
6273 new media::MojoDecoderFactory(GetMediaInterfaceProvider())); 6262 new media::MojoDecoderFactory(GetMediaInterfaceProvider()));
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
6442 // event target. Potentially a Pepper plugin will receive the event. 6431 // event target. Potentially a Pepper plugin will receive the event.
6443 // In order to tell whether a plugin gets the last mouse event and which it 6432 // In order to tell whether a plugin gets the last mouse event and which it
6444 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6433 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6445 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6434 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6446 // |pepper_last_mouse_event_target_|. 6435 // |pepper_last_mouse_event_target_|.
6447 pepper_last_mouse_event_target_ = nullptr; 6436 pepper_last_mouse_event_target_ = nullptr;
6448 #endif 6437 #endif
6449 } 6438 }
6450 6439
6451 } // namespace content 6440 } // namespace content
OLDNEW
« content/renderer/media/cdm/render_cdm_factory.h ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698