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

Side by Side Diff: media/base/player_tracker.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, 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
« no previous file with comments | « media/base/cdm_factory.h ('k') | media/base/player_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PLAYER_TRACKER_H_
6 #define MEDIA_BASE_PLAYER_TRACKER_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "media/base/media_export.h"
11
12 namespace media {
13
14 // An interface for players to register to be notified when a new decryption key
15 // becomes available or when the CDM is unset.
16 class MEDIA_EXPORT PlayerTracker {
17 public:
18 virtual ~PlayerTracker();
19
20 // Registers player callbacks with the CDM.
21 // - |new_key_cb| is fired when a new decryption key becomes available.
22 // - |cdm_unset_cb| is fired when the CDM is detached from the player.
23 // Returns a registration ID which can be used to unregister a player.
24 virtual int RegisterPlayer(const base::Closure& new_key_cb,
25 const base::Closure& cdm_unset_cb) = 0;
26
27 // Unregisters a previously registered player. This should be called when
28 // the CDM is detached from the player (e.g. setMediaKeys(0)), or when the
29 // player is destroyed.
30 virtual void UnregisterPlayer(int registration_id) = 0;
31
32 protected:
33 PlayerTracker();
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(PlayerTracker);
37 };
38
39 } // namespace media
40
41 #endif // MEDIA_BASE_PLAYER_TRACKER_H_
OLDNEW
« no previous file with comments | « media/base/cdm_factory.h ('k') | media/base/player_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698