Temporarily re-enabling SizeAfterPrefChange test with traces (this time for Linux...
[chromium-blink-merge.git] / media / base / browser_cdm.h
blob6e4e5cd39aa6f570726446bcf0a9631280e16e6f
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.
5 #ifndef MEDIA_BASE_BROWSER_CDM_H_
6 #define MEDIA_BASE_BROWSER_CDM_H_
8 #include "media/base/media_keys.h"
9 #include "media/base/player_tracker.h"
11 namespace media {
13 // Interface for browser side CDMs.
14 class BrowserCdm : public MediaKeys, public PlayerTracker {
15 public:
16 virtual ~BrowserCdm();
18 // MediaKeys implementation.
19 virtual bool CreateSession(uint32 session_id,
20 const std::string& content_type,
21 const uint8* init_data,
22 int init_data_length) = 0;
23 virtual void LoadSession(uint32 session_id,
24 const std::string& web_session_id) = 0;
25 virtual void UpdateSession(uint32 session_id,
26 const uint8* response,
27 int response_length) = 0;
28 virtual void ReleaseSession(uint32 session_id) = 0;
30 // PlayerTracker implementation.
31 virtual int RegisterPlayer(const base::Closure& new_key_cb,
32 const base::Closure& cdm_unset_cb) = 0;
33 virtual void UnregisterPlayer(int registration_id) = 0;
35 protected:
36 BrowserCdm();
38 private:
39 DISALLOW_COPY_AND_ASSIGN(BrowserCdm);
42 } // namespace media
44 #endif // MEDIA_BASE_BROWSER_CDM_H_