| 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 "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h" | 10 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h" |
| 11 #include "public/platform/WebContentDecryptionModuleAccess.h" | 11 #include "public/platform/WebContentDecryptionModuleAccess.h" |
| 12 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
| 13 #include <memory> |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 16 class MediaKeySystemAccess final : public GarbageCollectedFinalized<MediaKeySyst
emAccess>, public ScriptWrappable { | 17 class MediaKeySystemAccess final : public GarbageCollectedFinalized<MediaKeySyst
emAccess>, public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
| 18 | 19 |
| 19 public: | 20 public: |
| 20 MediaKeySystemAccess(const String& keySystem, PassOwnPtr<WebContentDecryptio
nModuleAccess>); | 21 MediaKeySystemAccess(const String& keySystem, std::unique_ptr<WebContentDecr
yptionModuleAccess>); |
| 21 virtual ~MediaKeySystemAccess(); | 22 virtual ~MediaKeySystemAccess(); |
| 22 | 23 |
| 23 const String& keySystem() const { return m_keySystem; } | 24 const String& keySystem() const { return m_keySystem; } |
| 24 void getConfiguration(MediaKeySystemConfiguration& result); | 25 void getConfiguration(MediaKeySystemConfiguration& result); |
| 25 ScriptPromise createMediaKeys(ScriptState*); | 26 ScriptPromise createMediaKeys(ScriptState*); |
| 26 | 27 |
| 27 DECLARE_TRACE(); | 28 DECLARE_TRACE(); |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 const String m_keySystem; | 31 const String m_keySystem; |
| 31 OwnPtr<WebContentDecryptionModuleAccess> m_access; | 32 std::unique_ptr<WebContentDecryptionModuleAccess> m_access; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace blink | 35 } // namespace blink |
| 35 | 36 |
| 36 #endif // MediaKeySystemAccess_h | 37 #endif // MediaKeySystemAccess_h |
| OLD | NEW |