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

Unified Diff: media/blink/encrypted_media_player_support.h

Issue 759933003: Move OnNeedKey() to WebMediaPlayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: media/blink/encrypted_media_player_support.h
diff --git a/media/blink/encrypted_media_player_support.h b/media/blink/encrypted_media_player_support.h
index a80ff58f95ae30f8738eb7f4b4f17d788506d05b..e2af1298b145b027febf3cc8bf49c9667b22d0c0 100644
--- a/media/blink/encrypted_media_player_support.h
+++ b/media/blink/encrypted_media_player_support.h
@@ -31,9 +31,7 @@ class WebContentDecryptionModuleImpl;
// Provides support to prefixed EME implementation.
// Do NOT add unprefixed EME functionality to this class!
-// TODO(xhwang): Move CreateNeedKeyCB() outside this class. Then when we
-// deprecate prefixed EME support, drop this whole file.
-
+// TODO(xhwang): When deprecating prefixed EME support, drop this whole file.
class EncryptedMediaPlayerSupport
: public base::SupportsWeakPtr<EncryptedMediaPlayerSupport> {
public:
@@ -63,10 +61,10 @@ class EncryptedMediaPlayerSupport
const blink::WebString& key_system,
const blink::WebString& session_id);
- Demuxer::NeedKeyCB CreateNeedKeyCB();
-
void OnPipelineDecryptError();
+ void SetInitDataType(const std::string& init_data_type);
ddorwin 2014/12/02 22:06:38 nit: It would reduce diffs if this was on the same
xhwang 2014/12/02 22:31:27 Done.
+
private:
blink::WebMediaPlayer::MediaKeyException GenerateKeyRequestInternal(
blink::WebLocalFrame* frame,
@@ -86,9 +84,6 @@ class EncryptedMediaPlayerSupport
const std::string& key_system,
const std::string& session_id);
- void OnNeedKey(const std::string& type,
- const std::vector<uint8>& init_data);
-
void OnKeyAdded(const std::string& session_id);
void OnKeyError(const std::string& session_id,
MediaKeys::KeyError error_code,
@@ -105,15 +100,15 @@ class EncryptedMediaPlayerSupport
// has been selected.
std::string current_key_system_;
- // Temporary for EME v0.1. In the future the init data type should be passed
- // through GenerateKeyRequest() directly from WebKit.
- std::string init_data_type_;
-
SetCdmContextCB set_cdm_context_cb_;
// Manages decryption keys and decrypts encrypted frames.
scoped_ptr<ProxyDecryptor> proxy_decryptor_;
+ // We assume all streams are from the same container, thus have the same
ddorwin 2014/12/02 22:06:38 Ditto, move above 103.
xhwang 2014/12/02 22:31:27 Done.
+ // init data type.
+ std::string init_data_type_;
+
DISALLOW_COPY_AND_ASSIGN(EncryptedMediaPlayerSupport);
};

Powered by Google App Engine
This is Rietveld 408576698