OLD | NEW |
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 <stdint.h> | 9 #include <stdint.h> |
10 #include <string> | 10 #include <string> |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 JNIEnv* env, | 237 JNIEnv* env, |
238 const base::android::JavaParamRef<jobject>&, | 238 const base::android::JavaParamRef<jobject>&, |
239 bool success); | 239 bool success); |
240 | 240 |
241 private: | 241 private: |
242 // For DeleteSoon() in DeleteOnCorrectThread(). | 242 // For DeleteSoon() in DeleteOnCorrectThread(). |
243 friend class base::DeleteHelper<MediaDrmBridge>; | 243 friend class base::DeleteHelper<MediaDrmBridge>; |
244 | 244 |
245 // Constructs a MediaDrmBridge for |scheme_uuid| and |security_level|. The | 245 // Constructs a MediaDrmBridge for |scheme_uuid| and |security_level|. The |
246 // default security level will be used if |security_level| is | 246 // default security level will be used if |security_level| is |
247 // SECURITY_LEVEL_DEFAULT. | 247 // SECURITY_LEVEL_DEFAULT. Sessions should not be created if session callbacks |
| 248 // are null. |
248 MediaDrmBridge(const std::vector<uint8_t>& scheme_uuid, | 249 MediaDrmBridge(const std::vector<uint8_t>& scheme_uuid, |
249 SecurityLevel security_level, | 250 SecurityLevel security_level, |
250 const CreateFetcherCB& create_fetcher_cb, | 251 const CreateFetcherCB& create_fetcher_cb, |
251 const SessionMessageCB& session_message_cb, | 252 const SessionMessageCB& session_message_cb, |
252 const SessionClosedCB& session_closed_cb, | 253 const SessionClosedCB& session_closed_cb, |
253 const LegacySessionErrorCB& legacy_session_error_cb, | 254 const LegacySessionErrorCB& legacy_session_error_cb, |
254 const SessionKeysChangeCB& session_keys_change_cb, | 255 const SessionKeysChangeCB& session_keys_change_cb, |
255 const SessionExpirationUpdateCB& session_expiration_update_cb); | 256 const SessionExpirationUpdateCB& session_expiration_update_cb); |
256 | 257 |
257 ~MediaDrmBridge() override; | 258 ~MediaDrmBridge() override; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 317 |
317 // NOTE: Weak pointers must be invalidated before all other member variables. | 318 // NOTE: Weak pointers must be invalidated before all other member variables. |
318 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; | 319 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; |
319 | 320 |
320 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); | 321 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); |
321 }; | 322 }; |
322 | 323 |
323 } // namespace media | 324 } // namespace media |
324 | 325 |
325 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ | 326 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ |
OLD | NEW |