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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 MediaKeySession::PendingAction::PendingAction(Type type, PassRefPtr<Uint8Array>
data) | 53 MediaKeySession::PendingAction::PendingAction(Type type, PassRefPtr<Uint8Array>
data) |
54 : type(type) | 54 : type(type) |
55 , data(data) | 55 , data(data) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 MediaKeySession::PendingAction::~PendingAction() | 59 MediaKeySession::PendingAction::~PendingAction() |
60 { | 60 { |
61 } | 61 } |
62 | 62 |
63 PassRefPtrWillBeRawPtr<MediaKeySession> MediaKeySession::create(ExecutionContext
* context, blink::WebContentDecryptionModule* cdm, WeakPtrWillBeRawPtr<MediaKeys
> keys) | 63 MediaKeySession* MediaKeySession::create(ExecutionContext* context, blink::WebCo
ntentDecryptionModule* cdm, MediaKeys* keys) |
64 { | 64 { |
65 RefPtrWillBeRawPtr<MediaKeySession> session(adoptRefWillBeRefCountedGarbageC
ollected(new MediaKeySession(context, cdm, keys))); | 65 MediaKeySession* session = adoptRefCountedGarbageCollected(new MediaKeySessi
on(context, cdm, keys)); |
66 session->suspendIfNeeded(); | 66 session->suspendIfNeeded(); |
67 return session.release(); | 67 return session; |
68 } | 68 } |
69 | 69 |
70 MediaKeySession::MediaKeySession(ExecutionContext* context, blink::WebContentDec
ryptionModule* cdm, WeakPtrWillBeRawPtr<MediaKeys> keys) | 70 MediaKeySession::MediaKeySession(ExecutionContext* context, blink::WebContentDec
ryptionModule* cdm, MediaKeys* keys) |
71 : ActiveDOMObject(context) | 71 : ActiveDOMObject(context) |
72 , m_keySystem(keys->keySystem()) | 72 , m_keySystem(keys->keySystem()) |
73 , m_asyncEventQueue(GenericEventQueue::create(this)) | 73 , m_asyncEventQueue(GenericEventQueue::create(this)) |
74 , m_session(adoptPtr(cdm->createSession(this))) | 74 , m_session(adoptPtr(cdm->createSession(this))) |
75 , m_keys(keys) | 75 , m_keys(keys) |
76 , m_isClosed(false) | 76 , m_isClosed(false) |
77 , m_actionTimer(this, &MediaKeySession::actionTimerFired) | 77 , m_actionTimer(this, &MediaKeySession::actionTimerFired) |
78 { | 78 { |
79 WTF_LOG(Media, "MediaKeySession::MediaKeySession"); | 79 WTF_LOG(Media, "MediaKeySession::MediaKeySession"); |
80 ScriptWrappable::init(this); | 80 ScriptWrappable::init(this); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 m_asyncEventQueue->close(); | 270 m_asyncEventQueue->close(); |
271 } | 271 } |
272 | 272 |
273 void MediaKeySession::trace(Visitor* visitor) | 273 void MediaKeySession::trace(Visitor* visitor) |
274 { | 274 { |
275 visitor->trace(m_keys); | 275 visitor->trace(m_keys); |
276 EventTargetWithInlineData::trace(visitor); | 276 EventTargetWithInlineData::trace(visitor); |
277 } | 277 } |
278 | 278 |
279 } | 279 } |
OLD | NEW |