OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013, Google Inc. All rights reserved. | 2 * Copyright (C) 2013, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "modules/webaudio/DynamicsCompressorNode.h" | 56 #include "modules/webaudio/DynamicsCompressorNode.h" |
57 #include "modules/webaudio/GainNode.h" | 57 #include "modules/webaudio/GainNode.h" |
58 #include "modules/webaudio/MediaElementAudioSourceNode.h" | 58 #include "modules/webaudio/MediaElementAudioSourceNode.h" |
59 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" | 59 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" |
60 #include "modules/webaudio/MediaStreamAudioSourceNode.h" | 60 #include "modules/webaudio/MediaStreamAudioSourceNode.h" |
61 #include "modules/webaudio/OscillatorNode.h" | 61 #include "modules/webaudio/OscillatorNode.h" |
62 #include "modules/webaudio/PannerNode.h" | 62 #include "modules/webaudio/PannerNode.h" |
63 #include "modules/webaudio/ScriptProcessorNode.h" | 63 #include "modules/webaudio/ScriptProcessorNode.h" |
64 #include "modules/webaudio/WaveShaperNode.h" | 64 #include "modules/webaudio/WaveShaperNode.h" |
65 | 65 |
66 namespace WebCore { | 66 namespace blink { |
67 | 67 |
68 v8::Handle<v8::Object> wrap(AudioNode* impl, v8::Handle<v8::Object> creationCont
ext, v8::Isolate* isolate) | 68 v8::Handle<v8::Object> wrap(AudioNode* impl, v8::Handle<v8::Object> creationCont
ext, v8::Isolate* isolate) |
69 { | 69 { |
70 ASSERT(impl); | 70 ASSERT(impl); |
71 switch (impl->nodeType()) { | 71 switch (impl->nodeType()) { |
72 case AudioNode::NodeTypeDestination: | 72 case AudioNode::NodeTypeDestination: |
73 return wrap(static_cast<AudioDestinationNode*>(impl), creationContext, i
solate); | 73 return wrap(static_cast<AudioDestinationNode*>(impl), creationContext, i
solate); |
74 case AudioNode::NodeTypeOscillator: | 74 case AudioNode::NodeTypeOscillator: |
75 return wrap(static_cast<OscillatorNode*>(impl), creationContext, isolate
); | 75 return wrap(static_cast<OscillatorNode*>(impl), creationContext, isolate
); |
76 case AudioNode::NodeTypeAudioBufferSource: | 76 case AudioNode::NodeTypeAudioBufferSource: |
(...skipping 27 matching lines...) Expand all Loading... |
104 case AudioNode::NodeTypeWaveShaper: | 104 case AudioNode::NodeTypeWaveShaper: |
105 return wrap(static_cast<WaveShaperNode*>(impl), creationContext, isolate
); | 105 return wrap(static_cast<WaveShaperNode*>(impl), creationContext, isolate
); |
106 default: | 106 default: |
107 ASSERT_NOT_REACHED(); | 107 ASSERT_NOT_REACHED(); |
108 break; | 108 break; |
109 } | 109 } |
110 | 110 |
111 return V8AudioNode::createWrapper(impl, creationContext, isolate); | 111 return V8AudioNode::createWrapper(impl, creationContext, isolate); |
112 } | 112 } |
113 | 113 |
114 } // namespace WebCore | 114 } // namespace blink |
115 | 115 |
116 #endif // ENABLE(WEB_AUDIO) | 116 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |