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

Side by Side Diff: media/base/android/media_player_android.h

Issue 276973005: BrowserMediaPlayerManager manages MediaKeys objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MEDIA_EXPORT 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "ui/gl/android/scoped_java_surface.h" 14 #include "ui/gl/android/scoped_java_surface.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class MediaDrmBridge; 19 class MediaKeys;
20 class MediaPlayerManager; 20 class MediaPlayerManager;
21 21
22 // This class serves as the base class for different media player 22 // This class serves as the base class for different media player
23 // implementations on Android. Subclasses need to provide their own 23 // implementations on Android. Subclasses need to provide their own
24 // MediaPlayerAndroid::Create() implementation. 24 // MediaPlayerAndroid::Create() implementation.
25 class MEDIA_EXPORT MediaPlayerAndroid { 25 class MEDIA_EXPORT MediaPlayerAndroid {
26 public: 26 public:
27 virtual ~MediaPlayerAndroid(); 27 virtual ~MediaPlayerAndroid();
28 28
29 // Error types for MediaErrorCB. 29 // Error types for MediaErrorCB.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual base::TimeDelta GetDuration() = 0; 66 virtual base::TimeDelta GetDuration() = 0;
67 virtual base::TimeDelta GetCurrentTime() = 0; 67 virtual base::TimeDelta GetCurrentTime() = 0;
68 virtual bool IsPlaying() = 0; 68 virtual bool IsPlaying() = 0;
69 virtual bool IsPlayerReady() = 0; 69 virtual bool IsPlayerReady() = 0;
70 virtual bool CanPause() = 0; 70 virtual bool CanPause() = 0;
71 virtual bool CanSeekForward() = 0; 71 virtual bool CanSeekForward() = 0;
72 virtual bool CanSeekBackward() = 0; 72 virtual bool CanSeekBackward() = 0;
73 virtual GURL GetUrl(); 73 virtual GURL GetUrl();
74 virtual GURL GetFirstPartyForCookies(); 74 virtual GURL GetFirstPartyForCookies();
75 75
76 // Pass a drm bridge to a player. 76 // Pass a CDM to a player.
ddorwin 2014/05/13 00:59:38 s/Pass/Provide/ (or attach or associate with).
xhwang 2014/05/14 16:42:06 Done.
77 virtual void SetDrmBridge(MediaDrmBridge* drm_bridge); 77 virtual void SetCdm(MediaKeys* cdm);
78 78
79 // Notifies the player that a decryption key has been added. The player 79 // Notifies the player that a decryption key has been added. The player
80 // may want to start/resume playback if it is waiting for a key. 80 // may want to start/resume playback if it is waiting for a key.
81 virtual void OnKeyAdded(); 81 virtual void OnKeyAdded();
82 82
83 // Check whether the player still uses the current surface. 83 // Check whether the player still uses the current surface.
84 virtual bool IsSurfaceInUse() const = 0; 84 virtual bool IsSurfaceInUse() const = 0;
85 85
86 int player_id() { return player_id_; } 86 int player_id() { return player_id_; }
87 87
(...skipping 15 matching lines...) Expand all
103 103
104 // Resource manager for all the media players. 104 // Resource manager for all the media players.
105 MediaPlayerManager* manager_; 105 MediaPlayerManager* manager_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); 107 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid);
108 }; 108 };
109 109
110 } // namespace media 110 } // namespace media
111 111
112 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 112 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698