Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |