OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 MediaKeySystemAccess_h | 5 #ifndef MediaKeySystemAccess_h |
6 #define MediaKeySystemAccess_h | 6 #define MediaKeySystemAccess_h |
7 | 7 |
| 8 #include <memory> |
8 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h" | 11 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h" |
11 #include "public/platform/WebContentDecryptionModuleAccess.h" | 12 #include "public/platform/WebContentDecryptionModuleAccess.h" |
12 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" |
13 #include <memory> | |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class MediaKeySystemAccess final | 17 class MediaKeySystemAccess final |
18 : public GarbageCollectedFinalized<MediaKeySystemAccess>, | 18 : public GarbageCollectedFinalized<MediaKeySystemAccess>, |
19 public ScriptWrappable { | 19 public ScriptWrappable { |
20 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
21 | 21 |
22 public: | 22 public: |
23 MediaKeySystemAccess(const String& keySystem, | 23 MediaKeySystemAccess(const String& keySystem, |
24 std::unique_ptr<WebContentDecryptionModuleAccess>); | 24 std::unique_ptr<WebContentDecryptionModuleAccess>); |
25 virtual ~MediaKeySystemAccess(); | 25 virtual ~MediaKeySystemAccess(); |
26 | 26 |
27 const String& keySystem() const { return m_keySystem; } | 27 const String& keySystem() const { return m_keySystem; } |
28 void getConfiguration(MediaKeySystemConfiguration& result); | 28 void getConfiguration(MediaKeySystemConfiguration& result); |
29 ScriptPromise createMediaKeys(ScriptState*); | 29 ScriptPromise createMediaKeys(ScriptState*); |
30 | 30 |
31 DECLARE_TRACE(); | 31 DECLARE_TRACE(); |
32 | 32 |
33 private: | 33 private: |
34 const String m_keySystem; | 34 const String m_keySystem; |
35 std::unique_ptr<WebContentDecryptionModuleAccess> m_access; | 35 std::unique_ptr<WebContentDecryptionModuleAccess> m_access; |
36 }; | 36 }; |
37 | 37 |
38 } // namespace blink | 38 } // namespace blink |
39 | 39 |
40 #endif // MediaKeySystemAccess_h | 40 #endif // MediaKeySystemAccess_h |
OLD | NEW |