| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 MediaKeys* mediaKeys = | 132 MediaKeys* mediaKeys = |
| 133 new MediaKeys(context, supportedSessionTypes, std::move(cdm)); | 133 new MediaKeys(context, supportedSessionTypes, std::move(cdm)); |
| 134 mediaKeys->suspendIfNeeded(); | 134 mediaKeys->suspendIfNeeded(); |
| 135 return mediaKeys; | 135 return mediaKeys; |
| 136 } | 136 } |
| 137 | 137 |
| 138 MediaKeys::MediaKeys( | 138 MediaKeys::MediaKeys( |
| 139 ExecutionContext* context, | 139 ExecutionContext* context, |
| 140 const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes, | 140 const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes, |
| 141 std::unique_ptr<WebContentDecryptionModule> cdm) | 141 std::unique_ptr<WebContentDecryptionModule> cdm) |
| 142 : ActiveScriptWrappable<MediaKeys>(this), | 142 : SuspendableObject(context), |
| 143 SuspendableObject(context), | |
| 144 m_supportedSessionTypes(supportedSessionTypes), | 143 m_supportedSessionTypes(supportedSessionTypes), |
| 145 m_cdm(std::move(cdm)), | 144 m_cdm(std::move(cdm)), |
| 146 m_mediaElement(nullptr), | 145 m_mediaElement(nullptr), |
| 147 m_reservedForMediaElement(false), | 146 m_reservedForMediaElement(false), |
| 148 m_timer(this, &MediaKeys::timerFired) { | 147 m_timer(this, &MediaKeys::timerFired) { |
| 149 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; | 148 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; |
| 150 } | 149 } |
| 151 | 150 |
| 152 MediaKeys::~MediaKeys() { | 151 MediaKeys::~MediaKeys() { |
| 153 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; | 152 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Remain around if there are pending events. | 308 // Remain around if there are pending events. |
| 310 DVLOG(MEDIA_KEYS_LOG_LEVEL) | 309 DVLOG(MEDIA_KEYS_LOG_LEVEL) |
| 311 << __func__ << "(" << this << ")" | 310 << __func__ << "(" << this << ")" |
| 312 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") | 311 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") |
| 313 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); | 312 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); |
| 314 | 313 |
| 315 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; | 314 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; |
| 316 } | 315 } |
| 317 | 316 |
| 318 } // namespace blink | 317 } // namespace blink |
| OLD | NEW |