Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: Source/modules/webaudio/MediaElementAudioSourceNode.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 { 45 {
46 return adoptRefCountedGarbageCollectedWillBeNoop(new MediaElementAudioSource Node(context, mediaElement)); 46 return adoptRefCountedGarbageCollectedWillBeNoop(new MediaElementAudioSource Node(context, mediaElement));
47 } 47 }
48 48
49 MediaElementAudioSourceNode::MediaElementAudioSourceNode(AudioContext* context, HTMLMediaElement* mediaElement) 49 MediaElementAudioSourceNode::MediaElementAudioSourceNode(AudioContext* context, HTMLMediaElement* mediaElement)
50 : AudioSourceNode(context, context->sampleRate()) 50 : AudioSourceNode(context, context->sampleRate())
51 , m_mediaElement(mediaElement) 51 , m_mediaElement(mediaElement)
52 , m_sourceNumberOfChannels(0) 52 , m_sourceNumberOfChannels(0)
53 , m_sourceSampleRate(0) 53 , m_sourceSampleRate(0)
54 { 54 {
55 ScriptWrappable::init(this);
56 // Default to stereo. This could change depending on what the media element 55 // Default to stereo. This could change depending on what the media element
57 // .src is set to. 56 // .src is set to.
58 addOutput(AudioNodeOutput::create(this, 2)); 57 addOutput(AudioNodeOutput::create(this, 2));
59 58
60 setNodeType(NodeTypeMediaElementAudioSource); 59 setNodeType(NodeTypeMediaElementAudioSource);
61 60
62 initialize(); 61 initialize();
63 } 62 }
64 63
65 MediaElementAudioSourceNode::~MediaElementAudioSourceNode() 64 MediaElementAudioSourceNode::~MediaElementAudioSourceNode()
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void MediaElementAudioSourceNode::trace(Visitor* visitor) 155 void MediaElementAudioSourceNode::trace(Visitor* visitor)
157 { 156 {
158 visitor->trace(m_mediaElement); 157 visitor->trace(m_mediaElement);
159 AudioSourceNode::trace(visitor); 158 AudioSourceNode::trace(visitor);
160 AudioSourceProviderClient::trace(visitor); 159 AudioSourceProviderClient::trace(visitor);
161 } 160 }
162 161
163 } // namespace blink 162 } // namespace blink
164 163
165 #endif // ENABLE(WEB_AUDIO) 164 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/GainNode.cpp ('k') | Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698