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 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" |
18 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
19 #include "media/base/android/media_drm_bridge_cdm_context.h" | 20 #include "media/base/android/media_drm_bridge_cdm_context.h" |
20 #include "media/base/android/provision_fetcher.h" | 21 #include "media/base/android/provision_fetcher.h" |
21 #include "media/base/cdm_promise.h" | 22 #include "media/base/cdm_promise.h" |
22 #include "media/base/cdm_promise_adapter.h" | 23 #include "media/base/cdm_promise_adapter.h" |
23 #include "media/base/media_export.h" | 24 #include "media/base/media_export.h" |
24 #include "media/base/media_keys.h" | 25 #include "media/base/media_keys.h" |
25 #include "media/base/player_tracker.h" | 26 #include "media/base/player_tracker.h" |
26 #include "media/cdm/player_tracker_impl.h" | 27 #include "media/cdm/player_tracker_impl.h" |
27 #include "url/gurl.h" | 28 #include "url/gurl.h" |
28 | 29 |
29 class GURL; | 30 class GURL; |
30 | 31 |
| 32 namespace base { |
| 33 class SingleThreadTaskRunner; |
| 34 } |
| 35 |
31 namespace media { | 36 namespace media { |
32 | 37 |
33 // Implements a CDM using Android MediaDrm API. | 38 // Implements a CDM using Android MediaDrm API. |
34 // | 39 // |
35 // Thread Safety: | 40 // Thread Safety: |
36 // | 41 // |
37 // This class lives on the thread where it is created. All methods must be | 42 // This class lives on the thread where it is created. All methods must be |
38 // called on the |task_runner_| except for the PlayerTracker methods and | 43 // called on the |task_runner_| except for the PlayerTracker methods and |
39 // SetMediaCryptoReadyCB(), which can be called on any thread. | 44 // SetMediaCryptoReadyCB(), which can be called on any thread. |
40 | 45 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 318 |
314 // NOTE: Weak pointers must be invalidated before all other member variables. | 319 // NOTE: Weak pointers must be invalidated before all other member variables. |
315 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; | 320 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; |
316 | 321 |
317 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); | 322 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); |
318 }; | 323 }; |
319 | 324 |
320 } // namespace media | 325 } // namespace media |
321 | 326 |
322 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ | 327 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ |
OLD | NEW |