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

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

Issue 131653003: Support LoadSession() in MediaKeys and PPP_ContentDecryptor_Private interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 10 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_DRM_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Call this function right after Create() and before any other calls. 63 // Call this function right after Create() and before any other calls.
64 // Note: 64 // Note:
65 // - If this function is not called, the default security level of the device 65 // - If this function is not called, the default security level of the device
66 // will be used. 66 // will be used.
67 // - It's recommended to call this function only once on a MediaDrmBridge 67 // - It's recommended to call this function only once on a MediaDrmBridge
68 // object. Calling this function multiples times may cause errors. 68 // object. Calling this function multiples times may cause errors.
69 bool SetSecurityLevel(SecurityLevel security_level); 69 bool SetSecurityLevel(SecurityLevel security_level);
70 70
71 // MediaKeys implementations. 71 // MediaKeys implementations.
72 virtual bool CreateSession(uint32 session_id, 72 virtual bool CreateSession(uint32 session_id,
73 const std::string& type, 73 const std::string& content_type,
74 const uint8* init_data, 74 const uint8* init_data,
75 int init_data_length) OVERRIDE; 75 int init_data_length) OVERRIDE;
76 virtual void LoadSession(uint32 session_id,
77 const std::string& web_session_id) OVERRIDE;
76 virtual void UpdateSession(uint32 session_id, 78 virtual void UpdateSession(uint32 session_id,
77 const uint8* response, 79 const uint8* response,
78 int response_length) OVERRIDE; 80 int response_length) OVERRIDE;
79 virtual void ReleaseSession(uint32 session_id) OVERRIDE; 81 virtual void ReleaseSession(uint32 session_id) OVERRIDE;
80 82
81 // Returns a MediaCrypto object if it's already created. Returns a null object 83 // Returns a MediaCrypto object if it's already created. Returns a null object
82 // otherwise. 84 // otherwise.
83 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); 85 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
84 86
85 // Sets callback which will be called when MediaCrypto is ready. 87 // Sets callback which will be called when MediaCrypto is ready.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 base::Closure media_crypto_ready_cb_; 146 base::Closure media_crypto_ready_cb_;
145 147
146 ResetCredentialsCB reset_credentials_cb_; 148 ResetCredentialsCB reset_credentials_cb_;
147 149
148 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); 150 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge);
149 }; 151 };
150 152
151 } // namespace media 153 } // namespace media
152 154
153 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 155 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698