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

Unified Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 193523002: Encrypted Media: Implement IPC based SetCdm(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/android/webmediaplayer_android.h
diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h
index 012e24ebc9c259e78228c9a632b1e1c74f36a322..189fd5627f2e639731a5d43f34b6da3a2276fca0 100644
--- a/content/renderer/media/android/webmediaplayer_android.h
+++ b/content/renderer/media/android/webmediaplayer_android.h
@@ -36,6 +36,7 @@ class MessageLoopProxy;
}
namespace blink {
+class WebContentDecryptionModule;
class WebFrame;
class WebURL;
}
@@ -53,8 +54,9 @@ class WebLayerImpl;
}
namespace content {
-class WebMediaPlayerDelegate;
class RendererMediaPlayerManager;
+class WebContentDecryptionModuleImpl;
+class WebMediaPlayerDelegate;
// This class implements blink::WebMediaPlayer by keeping the android
// media player in the browser process. It listens to all the status changes
@@ -216,6 +218,8 @@ class WebMediaPlayerAndroid
virtual MediaKeyException cancelKeyRequest(
const blink::WebString& key_system,
const blink::WebString& session_id);
+ virtual void setContentDecryptionModule(
+ blink::WebContentDecryptionModule* cdm);
void OnKeyAdded(const std::string& session_id);
void OnKeyError(const std::string& session_id,
@@ -438,11 +442,16 @@ class WebMediaPlayerAndroid
// through GenerateKeyRequest() directly from WebKit.
std::string init_data_type_;
- media::DecryptorReadyCB decryptor_ready_cb_;
-
// Manages decryption keys and decrypts encrypted frames.
scoped_ptr<ProxyDecryptor> proxy_decryptor_;
+ // Non-owned pointer to the CDM. Updated via calls to
+ // setContentDecryptionModule().
+ WebContentDecryptionModuleImpl* web_cdm_;
+
+ // Used by clear key implementation.
ddorwin 2014/03/11 04:06:33 Can we get rid of this somehow?
ddorwin 2014/03/11 18:05:14 It sounds like no. It would be nice to have consis
xhwang 2014/03/12 01:07:52 Agreed. Sounds like a good future cleanup task :\
+ media::DecryptorReadyCB decryptor_ready_cb_;
+
base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);

Powered by Google App Engine
This is Rietveld 408576698