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

Side by Side 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: minor fix 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_BROWSER_CDM_H_
6 #define MEDIA_BASE_BROWSER_CDM_H_
7
8 #include "media/base/media_keys.h"
9 #include "media/base/player_tracker.h"
10
11 namespace media {
12
13 // Interface for browser side CDMs.
14 class BrowserCdm : public MediaKeys, public PlayerTracker {
15 public:
damienv1 2014/05/30 15:10:15 We should have a function to query whether a key I
xhwang 2014/05/30 17:18:53 Currently no CDM provides this functionality (usab
16 BrowserCdm();
ddorwin 2014/05/30 20:50:05 protected or just remove.
xhwang 2014/06/02 20:11:43 Done.
17 virtual ~BrowserCdm();
18
19 // MediaKeys implementation.
20 virtual bool CreateSession(uint32 session_id,
21 const std::string& content_type,
22 const uint8* init_data,
23 int init_data_length) = 0;
24 virtual void LoadSession(uint32 session_id,
25 const std::string& web_session_id) = 0;
26 virtual void UpdateSession(uint32 session_id,
27 const uint8* response,
28 int response_length) = 0;
29 virtual void ReleaseSession(uint32 session_id) = 0;
30
31 // PlayerTracker implementation.
32 virtual int RegisterPlayer(const base::Closure& new_key_cb,
33 const base::Closure& cdm_destroyed_cb) = 0;
34 virtual void UnregisterPlayer(int registration_id) = 0;
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(BrowserCdm);
38 };
39
40 } // namespace media
41
42 #endif // MEDIA_BASE_BROWSER_CDM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698