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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1742933002: Remove EME and MSE from RuntimeEnabledFeatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 4 years, 9 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/public/common/content_switches.cc ('k') | media/blink/webmediaplayer_impl.cc » ('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/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 55 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
56 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h" 56 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h"
57 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h" 57 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h"
58 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 58 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
59 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h" 59 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h"
60 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 60 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
61 #include "third_party/WebKit/public/platform/WebString.h" 61 #include "third_party/WebKit/public/platform/WebString.h"
62 #include "third_party/WebKit/public/platform/WebURL.h" 62 #include "third_party/WebKit/public/platform/WebURL.h"
63 #include "third_party/WebKit/public/web/WebDocument.h" 63 #include "third_party/WebKit/public/web/WebDocument.h"
64 #include "third_party/WebKit/public/web/WebFrame.h" 64 #include "third_party/WebKit/public/web/WebFrame.h"
65 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
66 #include "third_party/WebKit/public/web/WebView.h" 65 #include "third_party/WebKit/public/web/WebView.h"
67 #include "third_party/skia/include/core/SkCanvas.h" 66 #include "third_party/skia/include/core/SkCanvas.h"
68 #include "third_party/skia/include/core/SkPaint.h" 67 #include "third_party/skia/include/core/SkPaint.h"
69 #include "third_party/skia/include/core/SkTypeface.h" 68 #include "third_party/skia/include/core/SkTypeface.h"
70 #include "third_party/skia/include/gpu/GrContext.h" 69 #include "third_party/skia/include/gpu/GrContext.h"
71 #include "third_party/skia/include/gpu/SkGrPixelRef.h" 70 #include "third_party/skia/include/gpu/SkGrPixelRef.h"
72 #include "ui/gfx/image/image.h" 71 #include "ui/gfx/image/image.h"
73 72
74 static const uint32_t kGLTextureExternalOES = 0x8D65; 73 static const uint32_t kGLTextureExternalOES = 0x8D65;
75 static const int kSDKVersionToSupportSecurityOriginCheck = 20; 74 static const int kSDKVersionToSupportSecurityOriginCheck = 20;
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 void WebMediaPlayerAndroid::OnMediaSourceOpened( 1481 void WebMediaPlayerAndroid::OnMediaSourceOpened(
1483 blink::WebMediaSource* web_media_source) { 1482 blink::WebMediaSource* web_media_source) {
1484 client_->mediaSourceOpened(web_media_source); 1483 client_->mediaSourceOpened(web_media_source);
1485 } 1484 }
1486 1485
1487 void WebMediaPlayerAndroid::OnEncryptedMediaInitData( 1486 void WebMediaPlayerAndroid::OnEncryptedMediaInitData(
1488 media::EmeInitDataType init_data_type, 1487 media::EmeInitDataType init_data_type,
1489 const std::vector<uint8_t>& init_data) { 1488 const std::vector<uint8_t>& init_data) {
1490 DCHECK(main_thread_checker_.CalledOnValidThread()); 1489 DCHECK(main_thread_checker_.CalledOnValidThread());
1491 1490
1492 // Do not fire the "encrypted" event if Encrypted Media is not enabled.
1493 // EME may not be enabled on Android Jelly Bean.
1494 if (!blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) {
1495 return;
1496 }
1497
1498 // TODO(xhwang): Update this UMA name. https://crbug.com/589251 1491 // TODO(xhwang): Update this UMA name. https://crbug.com/589251
1499 UMA_HISTOGRAM_COUNTS("Media.EME.NeedKey", 1); 1492 UMA_HISTOGRAM_COUNTS("Media.EME.NeedKey", 1);
1500 1493
1501 DCHECK(init_data_type != media::EmeInitDataType::UNKNOWN); 1494 DCHECK(init_data_type != media::EmeInitDataType::UNKNOWN);
1502 1495
1503 encrypted_client_->encrypted(ConvertToWebInitDataType(init_data_type), 1496 encrypted_client_->encrypted(ConvertToWebInitDataType(init_data_type),
1504 init_data.data(), init_data.size()); 1497 init_data.data(), init_data.size());
1505 } 1498 }
1506 1499
1507 void WebMediaPlayerAndroid::OnWaitingForDecryptionKey() { 1500 void WebMediaPlayerAndroid::OnWaitingForDecryptionKey() {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; 1656 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER;
1664 } else if (is_hls_url == is_hls) { 1657 } else if (is_hls_url == is_hls) {
1665 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; 1658 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER;
1666 } 1659 }
1667 UMA_HISTOGRAM_ENUMERATION( 1660 UMA_HISTOGRAM_ENUMERATION(
1668 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", 1661 "Media.Android.IsHttpLiveStreamingMediaPredictionResult",
1669 result, PREDICTION_RESULT_MAX); 1662 result, PREDICTION_RESULT_MAX);
1670 } 1663 }
1671 1664
1672 } // namespace content 1665 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698