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

Unified Diff: media/base/browser_cdm.h

Issue 308073004: Add PlayerTracker and BrowserCdm interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 7 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_source_player_unittest.cc ('k') | media/base/browser_cdm.cc » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..6e4e5cd39aa6f570726446bcf0a9631280e16e6f
--- /dev/null
+++ b/media/base/browser_cdm.h
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_BROWSER_CDM_H_
+#define MEDIA_BASE_BROWSER_CDM_H_
+
+#include "media/base/media_keys.h"
+#include "media/base/player_tracker.h"
+
+namespace media {
+
+// Interface for browser side CDMs.
+class BrowserCdm : public MediaKeys, public PlayerTracker {
+ public:
+ virtual ~BrowserCdm();
+
+ // MediaKeys implementation.
+ virtual bool CreateSession(uint32 session_id,
+ const std::string& content_type,
+ const uint8* init_data,
+ int init_data_length) = 0;
+ virtual void LoadSession(uint32 session_id,
+ const std::string& web_session_id) = 0;
+ virtual void UpdateSession(uint32 session_id,
+ const uint8* response,
+ int response_length) = 0;
+ virtual void ReleaseSession(uint32 session_id) = 0;
+
+ // PlayerTracker implementation.
+ virtual int RegisterPlayer(const base::Closure& new_key_cb,
+ const base::Closure& cdm_unset_cb) = 0;
+ virtual void UnregisterPlayer(int registration_id) = 0;
+
+ protected:
+ BrowserCdm();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BrowserCdm);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_BROWSER_CDM_H_
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | media/base/browser_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698