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 23 matching lines...) Expand all Loading... |
34 #include "modules/encryptedmedia/MediaKeys.h" | 34 #include "modules/encryptedmedia/MediaKeys.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 PassRefPtr<MediaKeySession> MediaKeySession::create(ScriptExecutionContext* cont
ext, ContentDecryptionModule* cdm, MediaKeys* keys) | 38 PassRefPtr<MediaKeySession> MediaKeySession::create(ScriptExecutionContext* cont
ext, ContentDecryptionModule* cdm, MediaKeys* keys) |
39 { | 39 { |
40 return adoptRef(new MediaKeySession(context, cdm, keys)); | 40 return adoptRef(new MediaKeySession(context, cdm, keys)); |
41 } | 41 } |
42 | 42 |
43 MediaKeySession::MediaKeySession(ScriptExecutionContext* context, ContentDecrypt
ionModule* cdm, MediaKeys* keys) | 43 MediaKeySession::MediaKeySession(ScriptExecutionContext* context, ContentDecrypt
ionModule* cdm, MediaKeys* keys) |
44 : ContextDestructionObserver(context) | 44 : ContextLifecycleObserver(context) |
45 , m_asyncEventQueue(GenericEventQueue::create(this)) | 45 , m_asyncEventQueue(GenericEventQueue::create(this)) |
46 , m_keySystem(keys->keySystem()) | 46 , m_keySystem(keys->keySystem()) |
47 , m_session(cdm->createSession(this)) | 47 , m_session(cdm->createSession(this)) |
48 , m_keys(keys) | 48 , m_keys(keys) |
49 , m_keyRequestTimer(this, &MediaKeySession::keyRequestTimerFired) | 49 , m_keyRequestTimer(this, &MediaKeySession::keyRequestTimerFired) |
50 , m_addKeyTimer(this, &MediaKeySession::addKeyTimerFired) | 50 , m_addKeyTimer(this, &MediaKeySession::addKeyTimerFired) |
51 { | 51 { |
52 ScriptWrappable::init(this); | 52 ScriptWrappable::init(this); |
53 } | 53 } |
54 | 54 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 m_asyncEventQueue->enqueueEvent(event.release()); | 191 m_asyncEventQueue->enqueueEvent(event.release()); |
192 } | 192 } |
193 | 193 |
194 const AtomicString& MediaKeySession::interfaceName() const | 194 const AtomicString& MediaKeySession::interfaceName() const |
195 { | 195 { |
196 return eventNames().interfaceForMediaKeySession; | 196 return eventNames().interfaceForMediaKeySession; |
197 } | 197 } |
198 | 198 |
199 ScriptExecutionContext* MediaKeySession::scriptExecutionContext() const | 199 ScriptExecutionContext* MediaKeySession::scriptExecutionContext() const |
200 { | 200 { |
201 return ContextDestructionObserver::scriptExecutionContext(); | 201 return ContextLifecycleObserver::scriptExecutionContext(); |
202 } | 202 } |
203 | 203 |
204 } | 204 } |
OLD | NEW |