| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
| 32 #include "core/events/GenericEventQueue.h" | 32 #include "core/events/GenericEventQueue.h" |
| 33 #include "core/html/MediaKeyError.h" | 33 #include "core/html/MediaKeyError.h" |
| 34 #include "modules/encryptedmedia/MediaKeyMessageEvent.h" | 34 #include "modules/encryptedmedia/MediaKeyMessageEvent.h" |
| 35 #include "modules/encryptedmedia/MediaKeys.h" | 35 #include "modules/encryptedmedia/MediaKeys.h" |
| 36 #include "platform/Logging.h" | 36 #include "platform/Logging.h" |
| 37 #include "platform/drm/ContentDecryptionModule.h" | 37 #include "platform/drm/ContentDecryptionModule.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 PassRefPtr<MediaKeySession> MediaKeySession::create(ExecutionContext* context, C
ontentDecryptionModule* cdm, MediaKeys* keys) | 41 DEFINE_GC_INFO(MediaKeySession); |
| 42 |
| 43 PassRefPtrWillBeRawPtr<MediaKeySession> MediaKeySession::create(ExecutionContext
* context, ContentDecryptionModule* cdm, MediaKeys* keys) |
| 42 { | 44 { |
| 43 return adoptRef(new MediaKeySession(context, cdm, keys)); | 45 return adoptRefCountedWillBeRefCountedGarbageCollected(new MediaKeySession(c
ontext, cdm, keys)); |
| 44 } | 46 } |
| 45 | 47 |
| 46 MediaKeySession::MediaKeySession(ExecutionContext* context, ContentDecryptionMod
ule* cdm, MediaKeys* keys) | 48 MediaKeySession::MediaKeySession(ExecutionContext* context, ContentDecryptionMod
ule* cdm, MediaKeys* keys) |
| 47 : ContextLifecycleObserver(context) | 49 : ContextLifecycleObserver(context) |
| 48 , m_keySystem(keys->keySystem()) | 50 , m_keySystem(keys->keySystem()) |
| 49 , m_asyncEventQueue(GenericEventQueue::create(this)) | 51 , m_asyncEventQueue(GenericEventQueue::create(this)) |
| 50 , m_session(cdm->createSession(this)) | 52 , m_session(cdm->createSession(this)) |
| 51 , m_keys(keys) | 53 , m_keys(keys) |
| 52 , m_updateTimer(this, &MediaKeySession::updateTimerFired) | 54 , m_updateTimer(this, &MediaKeySession::updateTimerFired) |
| 53 { | 55 { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 { | 192 { |
| 191 return EventTargetNames::MediaKeySession; | 193 return EventTargetNames::MediaKeySession; |
| 192 } | 194 } |
| 193 | 195 |
| 194 ExecutionContext* MediaKeySession::executionContext() const | 196 ExecutionContext* MediaKeySession::executionContext() const |
| 195 { | 197 { |
| 196 return ContextLifecycleObserver::executionContext(); | 198 return ContextLifecycleObserver::executionContext(); |
| 197 } | 199 } |
| 198 | 200 |
| 199 } | 201 } |
| OLD | NEW |