diff options
author | ddorwin <ddorwin@chromium.org> | 2016-03-02 21:06:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-03 05:07:51 +0000 |
commit | f1f20728a18fff332af52c0e60726a8b34510ba6 (patch) | |
tree | f4c5b710675a1a3787b404cd2a31a7d7b7532067 /media/base/android/media_drm_bridge.h | |
parent | fee5771921b6f93f36a3b102c30b3711db8b7b5b (diff) | |
download | chromium_src-f1f20728a18fff332af52c0e60726a8b34510ba6.zip chromium_src-f1f20728a18fff332af52c0e60726a8b34510ba6.tar.gz chromium_src-f1f20728a18fff332af52c0e60726a8b34510ba6.tar.bz2 |
EME on Android: Improve accuracy of Key System availability.
Implemented per https://crbug.com/582618#c7.
BUG=559236,582618
Review URL: https://codereview.chromium.org/1747073003
Cr-Commit-Position: refs/heads/master@{#378959}
Diffstat (limited to 'media/base/android/media_drm_bridge.h')
-rw-r--r-- | media/base/android/media_drm_bridge.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/media/base/android/media_drm_bridge.h b/media/base/android/media_drm_bridge.h index 04e57fc..d5408c1 100644 --- a/media/base/android/media_drm_bridge.h +++ b/media/base/android/media_drm_bridge.h @@ -55,9 +55,9 @@ class MEDIA_EXPORT MediaDrmBridge : public MediaKeys, public PlayerTracker { using MediaCryptoReadyCB = base::Callback<void(JavaObjectPtr media_crypto, bool needs_protected_surface)>; - // Checks whether MediaDRM is available. - // All other static methods check IsAvailable() internally. There's no need - // to check IsAvailable() explicitly before calling them. + // Checks whether MediaDRM is available and usable, including for decoding. + // All other static methods check IsAvailable() or equivalent internally. + // There is no need to check IsAvailable() explicitly before calling them. static bool IsAvailable(); static bool RegisterMediaDrmBridge(JNIEnv* env); @@ -243,6 +243,16 @@ class MEDIA_EXPORT MediaDrmBridge : public MediaKeys, public PlayerTracker { // For DeleteSoon() in DeleteOnCorrectThread(). friend class base::DeleteHelper<MediaDrmBridge>; + static scoped_refptr<MediaDrmBridge> CreateInternal( + const std::string& key_system, + SecurityLevel security_level, + const CreateFetcherCB& create_fetcher_cb, + const SessionMessageCB& session_message_cb, + const SessionClosedCB& session_closed_cb, + const LegacySessionErrorCB& legacy_session_error_cb, + const SessionKeysChangeCB& session_keys_change_cb, + const SessionExpirationUpdateCB& session_expiration_update_cb); + // Constructs a MediaDrmBridge for |scheme_uuid| and |security_level|. The // default security level will be used if |security_level| is // SECURITY_LEVEL_DEFAULT. Sessions should not be created if session callbacks |