| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 { | 154 { |
| 155 WTF_LOG(Media, "NewSessionResult(%p)", this); | 155 WTF_LOG(Media, "NewSessionResult(%p)", this); |
| 156 } | 156 } |
| 157 | 157 |
| 158 virtual ~NewSessionResult() | 158 virtual ~NewSessionResult() |
| 159 { | 159 { |
| 160 WTF_LOG(Media, "~NewSessionResult(%p)", this); | 160 WTF_LOG(Media, "~NewSessionResult(%p)", this); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // ContentDecryptionModuleResult implementation. | 163 // ContentDecryptionModuleResult implementation. |
| 164 virtual void complete() OVERRIDE | 164 virtual void complete() override |
| 165 { | 165 { |
| 166 ASSERT_NOT_REACHED(); | 166 ASSERT_NOT_REACHED(); |
| 167 completeWithDOMException(InvalidStateError, "Unexpected completion."); | 167 completeWithDOMException(InvalidStateError, "Unexpected completion."); |
| 168 } | 168 } |
| 169 | 169 |
| 170 virtual void completeWithSession(WebContentDecryptionModuleResult::SessionSt
atus status) OVERRIDE | 170 virtual void completeWithSession(WebContentDecryptionModuleResult::SessionSt
atus status) override |
| 171 { | 171 { |
| 172 if (status != WebContentDecryptionModuleResult::NewSession) { | 172 if (status != WebContentDecryptionModuleResult::NewSession) { |
| 173 ASSERT_NOT_REACHED(); | 173 ASSERT_NOT_REACHED(); |
| 174 completeWithDOMException(InvalidStateError, "Unexpected completion."
); | 174 completeWithDOMException(InvalidStateError, "Unexpected completion."
); |
| 175 } | 175 } |
| 176 | 176 |
| 177 m_session->finishGenerateRequest(); | 177 m_session->finishGenerateRequest(); |
| 178 m_resolver->resolve(); | 178 m_resolver->resolve(); |
| 179 m_resolver.clear(); | 179 m_resolver.clear(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 virtual void completeWithError(WebContentDecryptionModuleException exception
Code, unsigned long systemCode, const WebString& errorMessage) OVERRIDE | 182 virtual void completeWithError(WebContentDecryptionModuleException exception
Code, unsigned long systemCode, const WebString& errorMessage) override |
| 183 { | 183 { |
| 184 completeWithDOMException(WebCdmExceptionToExceptionCode(exceptionCode),
errorMessage); | 184 completeWithDOMException(WebCdmExceptionToExceptionCode(exceptionCode),
errorMessage); |
| 185 } | 185 } |
| 186 | 186 |
| 187 // It is only valid to call this before completion. | 187 // It is only valid to call this before completion. |
| 188 ScriptPromise promise() { return m_resolver->promise(); } | 188 ScriptPromise promise() { return m_resolver->promise(); } |
| 189 | 189 |
| 190 void trace(Visitor* visitor) | 190 void trace(Visitor* visitor) |
| 191 { | 191 { |
| 192 visitor->trace(m_session); | 192 visitor->trace(m_session); |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 { | 647 { |
| 648 visitor->trace(m_error); | 648 visitor->trace(m_error); |
| 649 visitor->trace(m_asyncEventQueue); | 649 visitor->trace(m_asyncEventQueue); |
| 650 visitor->trace(m_pendingActions); | 650 visitor->trace(m_pendingActions); |
| 651 visitor->trace(m_mediaKeys); | 651 visitor->trace(m_mediaKeys); |
| 652 visitor->trace(m_closedPromise); | 652 visitor->trace(m_closedPromise); |
| 653 EventTargetWithInlineData::trace(visitor); | 653 EventTargetWithInlineData::trace(visitor); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace blink | 656 } // namespace blink |
| OLD | NEW |