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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioNode.h

Issue 1405413004: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed feedback from yhirano Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.h b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
index 1a7d57a70d0d0b146566622e74a0178a67bde359..c055ba833158ccb6c3d0eedd0cfbb0e614191928 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
@@ -107,7 +107,7 @@ public:
// nullptr otherwise. This always returns a valid object in an audio
// rendering thread, and inside dispose(). We must not call context() in
// the destructor.
- AbstractAudioContext* context() const;
+ virtual AbstractAudioContext* context() const;
void clearContext() { m_context = nullptr; }
enum ChannelCountMode {
@@ -229,6 +229,12 @@ protected:
// Force all inputs to take any channel interpretation changes into account.
void updateChannelsForInputs();
+ // This raw pointer is safe because this is cleared for all of live
+ // AudioHandlers when the AbstractAudioContext dies. Do not access m_context
+ // directly, use context() instead.
+ GC_PLUGIN_IGNORE("http://crbug.com/404527")
+ AbstractAudioContext* m_context;
haraken 2015/11/17 08:28:10 Why do we need to move m_context to a protected me
hongchan 2015/11/17 18:11:44 1. OfflineAudioDestinationNode (inherited from Aud
haraken 2015/11/18 00:20:26 - Rename OfflineAudioDestinationNode::context() to
hongchan 2015/11/18 17:23:48 Yes, it is obvious thing to do - but 'context()' i
+
private:
void setNodeType(NodeType);
@@ -241,12 +247,6 @@ private:
GC_PLUGIN_IGNORE("http://crbug.com/404527")
AudioNode* m_node;
- // This raw pointer is safe because this is cleared for all of live
- // AudioHandlers when the AbstractAudioContext dies. Do not access m_context
- // directly, use context() instead.
- GC_PLUGIN_IGNORE("http://crbug.com/404527")
- AbstractAudioContext* m_context;
-
float m_sampleRate;
Vector<OwnPtr<AudioNodeInput>> m_inputs;
Vector<OwnPtr<AudioNodeOutput>> m_outputs;

Powered by Google App Engine
This is Rietveld 408576698