| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/encryptedmedia/MediaKeySystemAccess.h" | 6 #include "modules/encryptedmedia/MediaKeySystemAccess.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class NewCdmResultPromise : public ContentDecryptionModuleResultPromise { | 34 class NewCdmResultPromise : public ContentDecryptionModuleResultPromise { |
| 35 WTF_MAKE_NONCOPYABLE(NewCdmResultPromise); | 35 WTF_MAKE_NONCOPYABLE(NewCdmResultPromise); |
| 36 | 36 |
| 37 public: | 37 public: |
| 38 NewCdmResultPromise(ScriptState* scriptState, const WebVector<WebEncryptedMe
diaSessionType>& supportedSessionTypes) | 38 NewCdmResultPromise(ScriptState* scriptState, const WebVector<WebEncryptedMe
diaSessionType>& supportedSessionTypes) |
| 39 : ContentDecryptionModuleResultPromise(scriptState) | 39 : ContentDecryptionModuleResultPromise(scriptState) |
| 40 , m_supportedSessionTypes(supportedSessionTypes) | 40 , m_supportedSessionTypes(supportedSessionTypes) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual ~NewCdmResultPromise() | 44 ~NewCdmResultPromise() override |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 // ContentDecryptionModuleResult implementation. | 48 // ContentDecryptionModuleResult implementation. |
| 49 virtual void completeWithContentDecryptionModule(WebContentDecryptionModule*
cdm) override | 49 void completeWithContentDecryptionModule(WebContentDecryptionModule* cdm) ov
erride |
| 50 { | 50 { |
| 51 // NOTE: Continued from step 2.8 of createMediaKeys(). | 51 // NOTE: Continued from step 2.8 of createMediaKeys(). |
| 52 // 2.9. Let media keys be a new MediaKeys object. | 52 // 2.9. Let media keys be a new MediaKeys object. |
| 53 MediaKeys* mediaKeys = MediaKeys::create(executionContext(), m_supported
SessionTypes, adoptPtr(cdm)); | 53 MediaKeys* mediaKeys = MediaKeys::create(executionContext(), m_supported
SessionTypes, adoptPtr(cdm)); |
| 54 | 54 |
| 55 // 2.10. Resolve promise with media keys. | 55 // 2.10. Resolve promise with media keys. |
| 56 resolve(mediaKeys); | 56 resolve(mediaKeys); |
| 57 } | 57 } |
| 58 | 58 |
| 59 private: | 59 private: |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // 3. Return promise. | 167 // 3. Return promise. |
| 168 return promise; | 168 return promise; |
| 169 } | 169 } |
| 170 | 170 |
| 171 DEFINE_TRACE(MediaKeySystemAccess) | 171 DEFINE_TRACE(MediaKeySystemAccess) |
| 172 { | 172 { |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace blink | 175 } // namespace blink |
| OLD | NEW |