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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 { | 268 { |
269 } | 269 } |
270 | 270 |
271 // ContentDecryptionModuleResult implementation. | 271 // ContentDecryptionModuleResult implementation. |
272 virtual void completeWithSession(WebContentDecryptionModuleResult::SessionSt atus status) override | 272 virtual void completeWithSession(WebContentDecryptionModuleResult::SessionSt atus status) override |
273 { | 273 { |
274 bool result = false; | 274 bool result = false; |
275 switch (status) { | 275 switch (status) { |
276 case WebContentDecryptionModuleResult::NewSession: | 276 case WebContentDecryptionModuleResult::NewSession: |
277 result = true; | 277 result = true; |
278 m_session->finishLoad(); | |
278 break; | 279 break; |
279 | 280 |
280 case WebContentDecryptionModuleResult::SessionNotFound: | 281 case WebContentDecryptionModuleResult::SessionNotFound: |
281 result = false; | 282 result = false; |
ddorwin
2015/07/07 21:05:11
I think we can clean this up a little now to make
jrummell
2015/07/08 18:43:35
Done.
| |
282 break; | 283 break; |
283 | 284 |
284 case WebContentDecryptionModuleResult::SessionAlreadyExists: | 285 case WebContentDecryptionModuleResult::SessionAlreadyExists: |
285 ASSERT_NOT_REACHED(); | 286 ASSERT_NOT_REACHED(); |
286 reject(InvalidStateError, "Unexpected completion."); | 287 reject(InvalidStateError, "Unexpected completion."); |
287 return; | 288 return; |
288 } | 289 } |
289 | 290 |
290 m_session->finishLoad(); | |
291 resolve(result); | 291 resolve(result); |
292 } | 292 } |
293 | 293 |
294 DEFINE_INLINE_TRACE() | 294 DEFINE_INLINE_TRACE() |
295 { | 295 { |
296 visitor->trace(m_session); | 296 visitor->trace(m_session); |
297 ContentDecryptionModuleResultPromise::trace(visitor); | 297 ContentDecryptionModuleResultPromise::trace(visitor); |
298 } | 298 } |
299 | 299 |
300 private: | 300 private: |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
924 visitor->trace(m_asyncEventQueue); | 924 visitor->trace(m_asyncEventQueue); |
925 visitor->trace(m_pendingActions); | 925 visitor->trace(m_pendingActions); |
926 visitor->trace(m_mediaKeys); | 926 visitor->trace(m_mediaKeys); |
927 visitor->trace(m_keyStatusesMap); | 927 visitor->trace(m_keyStatusesMap); |
928 visitor->trace(m_closedPromise); | 928 visitor->trace(m_closedPromise); |
929 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor); | 929 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor); |
930 ActiveDOMObject::trace(visitor); | 930 ActiveDOMObject::trace(visitor); |
931 } | 931 } |
932 | 932 |
933 } // namespace blink | 933 } // namespace blink |
OLD | NEW |