| 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 15 matching lines...) Expand all Loading... |
| 26 #include "modules/encryptedmedia/MediaKeySession.h" | 26 #include "modules/encryptedmedia/MediaKeySession.h" |
| 27 | 27 |
| 28 #include "bindings/core/v8/DOMWrapperWorld.h" | 28 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 29 #include "bindings/core/v8/ScriptPromise.h" | 29 #include "bindings/core/v8/ScriptPromise.h" |
| 30 #include "bindings/core/v8/ScriptPromiseResolver.h" | 30 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 31 #include "bindings/core/v8/ScriptState.h" | 31 #include "bindings/core/v8/ScriptState.h" |
| 32 #include "bindings/core/v8/V8ThrowException.h" | 32 #include "bindings/core/v8/V8ThrowException.h" |
| 33 #include "core/dom/DOMArrayBuffer.h" | 33 #include "core/dom/DOMArrayBuffer.h" |
| 34 #include "core/dom/DOMException.h" | 34 #include "core/dom/DOMException.h" |
| 35 #include "core/dom/ExceptionCode.h" | 35 #include "core/dom/ExceptionCode.h" |
| 36 #include "core/dom/TaskRunnerHelper.h" |
| 36 #include "core/events/Event.h" | 37 #include "core/events/Event.h" |
| 37 #include "core/events/GenericEventQueue.h" | 38 #include "core/events/GenericEventQueue.h" |
| 38 #include "modules/encryptedmedia/ContentDecryptionModuleResultPromise.h" | 39 #include "modules/encryptedmedia/ContentDecryptionModuleResultPromise.h" |
| 39 #include "modules/encryptedmedia/EncryptedMediaUtils.h" | 40 #include "modules/encryptedmedia/EncryptedMediaUtils.h" |
| 40 #include "modules/encryptedmedia/MediaKeyMessageEvent.h" | 41 #include "modules/encryptedmedia/MediaKeyMessageEvent.h" |
| 41 #include "modules/encryptedmedia/MediaKeys.h" | 42 #include "modules/encryptedmedia/MediaKeys.h" |
| 42 #include "platform/ContentDecryptionModuleResult.h" | 43 #include "platform/ContentDecryptionModuleResult.h" |
| 43 #include "platform/InstanceCounters.h" | 44 #include "platform/InstanceCounters.h" |
| 44 #include "platform/Timer.h" | 45 #include "platform/Timer.h" |
| 45 #include "platform/network/mime/ContentType.h" | 46 #include "platform/network/mime/ContentType.h" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 m_mediaKeys(mediaKeys), | 368 m_mediaKeys(mediaKeys), |
| 368 m_sessionType(sessionType), | 369 m_sessionType(sessionType), |
| 369 m_expiration(std::numeric_limits<double>::quiet_NaN()), | 370 m_expiration(std::numeric_limits<double>::quiet_NaN()), |
| 370 m_keyStatusesMap(new MediaKeyStatusMap()), | 371 m_keyStatusesMap(new MediaKeyStatusMap()), |
| 371 m_isUninitialized(true), | 372 m_isUninitialized(true), |
| 372 m_isCallable(false), | 373 m_isCallable(false), |
| 373 m_isClosed(false), | 374 m_isClosed(false), |
| 374 m_closedPromise(new ClosedPromise(scriptState->getExecutionContext(), | 375 m_closedPromise(new ClosedPromise(scriptState->getExecutionContext(), |
| 375 this, | 376 this, |
| 376 ClosedPromise::Closed)), | 377 ClosedPromise::Closed)), |
| 377 m_actionTimer(this, &MediaKeySession::actionTimerFired) { | 378 m_actionTimer( |
| 379 TaskRunnerHelper::get(TaskType::MiscPlatformAPI, scriptState), |
| 380 this, |
| 381 &MediaKeySession::actionTimerFired) { |
| 378 DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __func__ << "(" << this << ")"; | 382 DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __func__ << "(" << this << ")"; |
| 379 InstanceCounters::incrementCounter(InstanceCounters::MediaKeySessionCounter); | 383 InstanceCounters::incrementCounter(InstanceCounters::MediaKeySessionCounter); |
| 380 | 384 |
| 381 // Create the matching Chromium object. It will not be usable until | 385 // Create the matching Chromium object. It will not be usable until |
| 382 // initializeNewSession() is called in response to the user calling | 386 // initializeNewSession() is called in response to the user calling |
| 383 // generateRequest(). | 387 // generateRequest(). |
| 384 WebContentDecryptionModule* cdm = mediaKeys->contentDecryptionModule(); | 388 WebContentDecryptionModule* cdm = mediaKeys->contentDecryptionModule(); |
| 385 m_session = WTF::wrapUnique(cdm->createSession()); | 389 m_session = WTF::wrapUnique(cdm->createSession()); |
| 386 m_session->setClientInterface(this); | 390 m_session->setClientInterface(this); |
| 387 | 391 |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 visitor->trace(m_asyncEventQueue); | 1047 visitor->trace(m_asyncEventQueue); |
| 1044 visitor->trace(m_pendingActions); | 1048 visitor->trace(m_pendingActions); |
| 1045 visitor->trace(m_mediaKeys); | 1049 visitor->trace(m_mediaKeys); |
| 1046 visitor->trace(m_keyStatusesMap); | 1050 visitor->trace(m_keyStatusesMap); |
| 1047 visitor->trace(m_closedPromise); | 1051 visitor->trace(m_closedPromise); |
| 1048 EventTargetWithInlineData::trace(visitor); | 1052 EventTargetWithInlineData::trace(visitor); |
| 1049 ContextLifecycleObserver::trace(visitor); | 1053 ContextLifecycleObserver::trace(visitor); |
| 1050 } | 1054 } |
| 1051 | 1055 |
| 1052 } // namespace blink | 1056 } // namespace blink |
| OLD | NEW |