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 "modules/encryptedmedia/MediaKeySystemAccess.h" | 5 #include "modules/encryptedmedia/MediaKeySystemAccess.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // ContentDecryptionModuleResult implementation. | 45 // ContentDecryptionModuleResult implementation. |
46 void completeWithContentDecryptionModule( | 46 void completeWithContentDecryptionModule( |
47 WebContentDecryptionModule* cdm) override { | 47 WebContentDecryptionModule* cdm) override { |
48 // NOTE: Continued from step 2.8 of createMediaKeys(). | 48 // NOTE: Continued from step 2.8 of createMediaKeys(). |
49 | 49 |
50 if (!isValidToFulfillPromise()) | 50 if (!isValidToFulfillPromise()) |
51 return; | 51 return; |
52 | 52 |
53 // 2.9. Let media keys be a new MediaKeys object. | 53 // 2.9. Let media keys be a new MediaKeys object. |
54 MediaKeys* mediaKeys = MediaKeys::create( | 54 MediaKeys* mediaKeys = MediaKeys::create( |
55 getExecutionContext(), m_supportedSessionTypes, wrapUnique(cdm)); | 55 getExecutionContext(), m_supportedSessionTypes, WTF::wrapUnique(cdm)); |
56 | 56 |
57 // 2.10. Resolve promise with media keys. | 57 // 2.10. Resolve promise with media keys. |
58 resolve(mediaKeys); | 58 resolve(mediaKeys); |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
62 WebVector<WebEncryptedMediaSessionType> m_supportedSessionTypes; | 62 WebVector<WebEncryptedMediaSessionType> m_supportedSessionTypes; |
63 }; | 63 }; |
64 | 64 |
65 // These methods are the inverses of those with the same names in | 65 // These methods are the inverses of those with the same names in |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // (Done if completeWithException() called). | 164 // (Done if completeWithException() called). |
165 m_access->createContentDecryptionModule(helper->result()); | 165 m_access->createContentDecryptionModule(helper->result()); |
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 } // namespace blink | 173 } // namespace blink |
OLD | NEW |