| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 { | 182 { |
| 183 uninitialize(); | 183 uninitialize(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool AbstractAudioContext::hasPendingActivity() const | 186 bool AbstractAudioContext::hasPendingActivity() const |
| 187 { | 187 { |
| 188 // There's no pending activity if the audio context has been cleared. | 188 // There's no pending activity if the audio context has been cleared. |
| 189 return !m_isCleared; | 189 return !m_isCleared; |
| 190 } | 190 } |
| 191 | 191 |
| 192 AudioDestinationNode* AbstractAudioContext::destination() const |
| 193 { |
| 194 // Cannot be called from the audio thread because this method touches object
s managed by Oilpan, |
| 195 // and the audio thread is not managed by Oilpan. |
| 196 ASSERT(!isAudioThread()); |
| 197 return m_destinationNode.get(); |
| 198 } |
| 199 |
| 192 void AbstractAudioContext::throwExceptionForClosedState(ExceptionState& exceptio
nState) | 200 void AbstractAudioContext::throwExceptionForClosedState(ExceptionState& exceptio
nState) |
| 193 { | 201 { |
| 194 exceptionState.throwDOMException(InvalidStateError, "AudioContext has been c
losed."); | 202 exceptionState.throwDOMException(InvalidStateError, "AudioContext has been c
losed."); |
| 195 } | 203 } |
| 196 | 204 |
| 197 AudioBuffer* AbstractAudioContext::createBuffer(unsigned numberOfChannels, size_
t numberOfFrames, float sampleRate, ExceptionState& exceptionState) | 205 AudioBuffer* AbstractAudioContext::createBuffer(unsigned numberOfChannels, size_
t numberOfFrames, float sampleRate, ExceptionState& exceptionState) |
| 198 { | 206 { |
| 199 // It's ok to call createBuffer, even if the context is closed because the A
udioBuffer doesn't | 207 // It's ok to call createBuffer, even if the context is closed because the A
udioBuffer doesn't |
| 200 // really "belong" to any particular context. | 208 // really "belong" to any particular context. |
| 201 | 209 |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const | 957 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const |
| 950 { | 958 { |
| 951 if (getExecutionContext()) | 959 if (getExecutionContext()) |
| 952 return getExecutionContext()->getSecurityOrigin(); | 960 return getExecutionContext()->getSecurityOrigin(); |
| 953 | 961 |
| 954 return nullptr; | 962 return nullptr; |
| 955 } | 963 } |
| 956 | 964 |
| 957 } // namespace blink | 965 } // namespace blink |
| 958 | 966 |
| OLD | NEW |