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(this), | 142 : ActiveScriptWrappable<MediaKeys>(this), |
143 SuspendableObject(context), | 143 SuspendableObject(context), |
144 m_supportedSessionTypes(supportedSessionTypes), | 144 m_supportedSessionTypes(supportedSessionTypes), |
145 m_cdm(std::move(cdm)), | 145 m_cdm(std::move(cdm)), |
146 m_mediaElement(nullptr), | 146 m_mediaElement(nullptr), |
147 m_reservedForMediaElement(false), | 147 m_reservedForMediaElement(false), |
148 m_timer(this, &MediaKeys::timerFired) { | 148 m_timer(this, &MediaKeys::timerFired) { |
149 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; | 149 DVLOG(MEDIA_KEYS_LOG_LEVEL) << __func__ << "(" << this << ")"; |
150 } | 150 } |
151 | 151 |
152 MediaKeys::~MediaKeys() { | 152 MediaKeys::~MediaKeys() { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 // Remain around if there are pending events. | 309 // Remain around if there are pending events. |
310 DVLOG(MEDIA_KEYS_LOG_LEVEL) | 310 DVLOG(MEDIA_KEYS_LOG_LEVEL) |
311 << __func__ << "(" << this << ")" | 311 << __func__ << "(" << this << ")" |
312 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") | 312 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") |
313 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); | 313 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); |
314 | 314 |
315 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; | 315 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; |
316 } | 316 } |
317 | 317 |
318 } // namespace blink | 318 } // namespace blink |
OLD | NEW |