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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // 5. Return promise. | 185 // 5. Return promise. |
186 return MediaKeysInitializer::create(scriptState, keySystem); | 186 return MediaKeysInitializer::create(scriptState, keySystem); |
187 } | 187 } |
188 | 188 |
189 MediaKeys::MediaKeys(ExecutionContext* context, const String& keySystem, PassOwn
Ptr<WebContentDecryptionModule> cdm) | 189 MediaKeys::MediaKeys(ExecutionContext* context, const String& keySystem, PassOwn
Ptr<WebContentDecryptionModule> cdm) |
190 : ContextLifecycleObserver(context) | 190 : ContextLifecycleObserver(context) |
191 , m_keySystem(keySystem) | 191 , m_keySystem(keySystem) |
192 , m_cdm(cdm) | 192 , m_cdm(cdm) |
193 { | 193 { |
194 WTF_LOG(Media, "MediaKeys(%p)::MediaKeys", this); | 194 WTF_LOG(Media, "MediaKeys(%p)::MediaKeys", this); |
195 ScriptWrappable::init(this); | |
196 | 195 |
197 // Step 4.4 of MediaKeys::create(): | 196 // Step 4.4 of MediaKeys::create(): |
198 // 4.4.1 Set the keySystem attribute to keySystem. | 197 // 4.4.1 Set the keySystem attribute to keySystem. |
199 ASSERT(!m_keySystem.isEmpty()); | 198 ASSERT(!m_keySystem.isEmpty()); |
200 } | 199 } |
201 | 200 |
202 MediaKeys::~MediaKeys() | 201 MediaKeys::~MediaKeys() |
203 { | 202 { |
204 WTF_LOG(Media, "MediaKeys(%p)::~MediaKeys", this); | 203 WTF_LOG(Media, "MediaKeys(%p)::~MediaKeys", this); |
205 } | 204 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 291 |
293 void MediaKeys::contextDestroyed() | 292 void MediaKeys::contextDestroyed() |
294 { | 293 { |
295 ContextLifecycleObserver::contextDestroyed(); | 294 ContextLifecycleObserver::contextDestroyed(); |
296 | 295 |
297 // We don't need the CDM anymore. | 296 // We don't need the CDM anymore. |
298 m_cdm.clear(); | 297 m_cdm.clear(); |
299 } | 298 } |
300 | 299 |
301 } // namespace blink | 300 } // namespace blink |
OLD | NEW |