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

Unified Diff: media/base/browser_cdm.h

Issue 265993002: Add Promises for EME (Chromium side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more trybot issue Created 6 years, 6 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
« no previous file with comments | « media/base/android/media_player_android.cc ('k') | media/base/browser_cdm_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/browser_cdm.h
diff --git a/media/base/browser_cdm.h b/media/base/browser_cdm.h
index 6e4e5cd39aa6f570726446bcf0a9631280e16e6f..b6b6044c4d7504af258e000f3115da9f38018d27 100644
--- a/media/base/browser_cdm.h
+++ b/media/base/browser_cdm.h
@@ -11,11 +11,29 @@
namespace media {
// Interface for browser side CDMs.
-class BrowserCdm : public MediaKeys, public PlayerTracker {
+class BrowserCdm : public PlayerTracker {
public:
+ // TODO(jrummell): Update this to actually derive from MediaKeys
+ // (Use web_session_id rather than session_id).
+ typedef base::Callback<
+ void(uint32 session_id, const std::string& web_session_id)>
+ SessionCreatedCB;
+
+ typedef base::Callback<void(uint32 session_id,
+ const std::vector<uint8>& message,
+ const GURL& destination_url)> SessionMessageCB;
+
+ typedef base::Callback<void(uint32 session_id)> SessionReadyCB;
+
+ typedef base::Callback<void(uint32 session_id)> SessionClosedCB;
+
+ typedef base::Callback<void(uint32 session_id,
+ media::MediaKeys::KeyError error_code,
+ uint32 system_code)> SessionErrorCB;
+
virtual ~BrowserCdm();
- // MediaKeys implementation.
+ // MediaKeys-like implementation.
virtual bool CreateSession(uint32 session_id,
const std::string& content_type,
const uint8* init_data,
« no previous file with comments | « media/base/android/media_player_android.cc ('k') | media/base/browser_cdm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698