| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 m_resolver->reject(DOMException::create(code, errorMessage)); | 200 m_resolver->reject(DOMException::create(code, errorMessage)); |
| 201 m_resolver.clear(); | 201 m_resolver.clear(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 RefPtr<ScriptPromiseResolver> m_resolver; | 204 RefPtr<ScriptPromiseResolver> m_resolver; |
| 205 Member<MediaKeySession> m_session; | 205 Member<MediaKeySession> m_session; |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 MediaKeySession* MediaKeySession::create(ScriptState* scriptState, MediaKeys* me
diaKeys, const String& sessionType) | 208 MediaKeySession* MediaKeySession::create(ScriptState* scriptState, MediaKeys* me
diaKeys, const String& sessionType) |
| 209 { | 209 { |
| 210 RefPtrWillBeRawPtr<MediaKeySession> session = adoptRefCountedGarbageCollecte
dWillBeNoop(new MediaKeySession(scriptState, mediaKeys, sessionType)); | 210 RefPtrWillBeRawPtr<MediaKeySession> session = new MediaKeySession(scriptStat
e, mediaKeys, sessionType); |
| 211 session->suspendIfNeeded(); | 211 session->suspendIfNeeded(); |
| 212 return session.get(); | 212 return session.get(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 MediaKeySession::MediaKeySession(ScriptState* scriptState, MediaKeys* mediaKeys,
const String& sessionType) | 215 MediaKeySession::MediaKeySession(ScriptState* scriptState, MediaKeys* mediaKeys,
const String& sessionType) |
| 216 : ActiveDOMObject(scriptState->executionContext()) | 216 : ActiveDOMObject(scriptState->executionContext()) |
| 217 , m_keySystem(mediaKeys->keySystem()) | 217 , m_keySystem(mediaKeys->keySystem()) |
| 218 , m_asyncEventQueue(GenericEventQueue::create(this)) | 218 , m_asyncEventQueue(GenericEventQueue::create(this)) |
| 219 , m_mediaKeys(mediaKeys) | 219 , m_mediaKeys(mediaKeys) |
| 220 , m_sessionType(sessionType) | 220 , m_sessionType(sessionType) |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 { | 647 { |
| 648 visitor->trace(m_error); | 648 visitor->trace(m_error); |
| 649 visitor->trace(m_asyncEventQueue); | 649 visitor->trace(m_asyncEventQueue); |
| 650 visitor->trace(m_pendingActions); | 650 visitor->trace(m_pendingActions); |
| 651 visitor->trace(m_mediaKeys); | 651 visitor->trace(m_mediaKeys); |
| 652 visitor->trace(m_closedPromise); | 652 visitor->trace(m_closedPromise); |
| 653 EventTargetWithInlineData::trace(visitor); | 653 EventTargetWithInlineData::trace(visitor); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace blink | 656 } // namespace blink |
| OLD | NEW |