| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // 6. Return promise. | 159 // 6. Return promise. |
| 160 return promise; | 160 return promise; |
| 161 } | 161 } |
| 162 | 162 |
| 163 void MediaKeys::timerFired(Timer<MediaKeys>*) | 163 void MediaKeys::timerFired(Timer<MediaKeys>*) |
| 164 { | 164 { |
| 165 ASSERT(m_pendingActions.size()); | 165 ASSERT(m_pendingActions.size()); |
| 166 | 166 |
| 167 // Swap the queue to a local copy to avoid problems if resolving promises | 167 // Swap the queue to a local copy to avoid problems if resolving promises |
| 168 // run synchronously. | 168 // run synchronously. |
| 169 HeapDeque<Member<PendingAction> > pendingActions; | 169 HeapDeque<Member<PendingAction>> pendingActions; |
| 170 pendingActions.swap(m_pendingActions); | 170 pendingActions.swap(m_pendingActions); |
| 171 | 171 |
| 172 while (!pendingActions.isEmpty()) { | 172 while (!pendingActions.isEmpty()) { |
| 173 PendingAction* action = pendingActions.takeFirst(); | 173 PendingAction* action = pendingActions.takeFirst(); |
| 174 WTF_LOG(Media, "MediaKeys(%p)::timerFired: Certificate", this); | 174 WTF_LOG(Media, "MediaKeys(%p)::timerFired: Certificate", this); |
| 175 | 175 |
| 176 // 5.1 Let cdm be the cdm during the initialization of this object. | 176 // 5.1 Let cdm be the cdm during the initialization of this object. |
| 177 WebContentDecryptionModule* cdm = contentDecryptionModule(); | 177 WebContentDecryptionModule* cdm = contentDecryptionModule(); |
| 178 | 178 |
| 179 // 5.2 Use the cdm to process certificate. | 179 // 5.2 Use the cdm to process certificate. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 198 | 198 |
| 199 void MediaKeys::contextDestroyed() | 199 void MediaKeys::contextDestroyed() |
| 200 { | 200 { |
| 201 ContextLifecycleObserver::contextDestroyed(); | 201 ContextLifecycleObserver::contextDestroyed(); |
| 202 | 202 |
| 203 // We don't need the CDM anymore. | 203 // We don't need the CDM anymore. |
| 204 m_cdm.clear(); | 204 m_cdm.clear(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |