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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 AbstractAudioContext* AbstractAudioContext::create(Document& document, Exception State& exceptionState) 73 AbstractAudioContext* AbstractAudioContext::create(Document& document, Exception State& exceptionState)
74 { 74 {
75 return AudioContext::create(document, exceptionState); 75 return AudioContext::create(document, exceptionState);
76 } 76 }
77 77
78 // FIXME(dominicc): Devolve these constructors to AudioContext 78 // FIXME(dominicc): Devolve these constructors to AudioContext
79 // and OfflineAudioContext respectively. 79 // and OfflineAudioContext respectively.
80 80
81 // Constructor for rendering to the audio hardware. 81 // Constructor for rendering to the audio hardware.
82 AbstractAudioContext::AbstractAudioContext(Document* document) 82 AbstractAudioContext::AbstractAudioContext(Document* document)
83 : ActiveDOMObject(document) 83 : ActiveScriptWrappable(this)
84 , ActiveDOMObject(document)
84 , m_destinationNode(nullptr) 85 , m_destinationNode(nullptr)
85 , m_isCleared(false) 86 , m_isCleared(false)
86 , m_isResolvingResumePromises(false) 87 , m_isResolvingResumePromises(false)
87 , m_connectionCount(0) 88 , m_connectionCount(0)
88 , m_didInitializeContextGraphMutex(false) 89 , m_didInitializeContextGraphMutex(false)
89 , m_deferredTaskHandler(DeferredTaskHandler::create()) 90 , m_deferredTaskHandler(DeferredTaskHandler::create())
90 , m_contextState(Suspended) 91 , m_contextState(Suspended)
91 , m_closedContextSampleRate(-1) 92 , m_closedContextSampleRate(-1)
92 , m_periodicWaveSine(nullptr) 93 , m_periodicWaveSine(nullptr)
93 , m_periodicWaveSquare(nullptr) 94 , m_periodicWaveSquare(nullptr)
94 , m_periodicWaveSawtooth(nullptr) 95 , m_periodicWaveSawtooth(nullptr)
95 , m_periodicWaveTriangle(nullptr) 96 , m_periodicWaveTriangle(nullptr)
96 { 97 {
97 m_didInitializeContextGraphMutex = true; 98 m_didInitializeContextGraphMutex = true;
98 m_destinationNode = DefaultAudioDestinationNode::create(this); 99 m_destinationNode = DefaultAudioDestinationNode::create(this);
99 100
100 initialize(); 101 initialize();
101 } 102 }
102 103
103 // Constructor for offline (non-realtime) rendering. 104 // Constructor for offline (non-realtime) rendering.
104 AbstractAudioContext::AbstractAudioContext(Document* document, unsigned numberOf Channels, size_t numberOfFrames, float sampleRate) 105 AbstractAudioContext::AbstractAudioContext(Document* document, unsigned numberOf Channels, size_t numberOfFrames, float sampleRate)
105 : ActiveDOMObject(document) 106 : ActiveScriptWrappable(this)
107 , ActiveDOMObject(document)
106 , m_destinationNode(nullptr) 108 , m_destinationNode(nullptr)
107 , m_isCleared(false) 109 , m_isCleared(false)
108 , m_isResolvingResumePromises(false) 110 , m_isResolvingResumePromises(false)
109 , m_connectionCount(0) 111 , m_connectionCount(0)
110 , m_didInitializeContextGraphMutex(false) 112 , m_didInitializeContextGraphMutex(false)
111 , m_deferredTaskHandler(DeferredTaskHandler::create()) 113 , m_deferredTaskHandler(DeferredTaskHandler::create())
112 , m_contextState(Suspended) 114 , m_contextState(Suspended)
113 , m_closedContextSampleRate(-1) 115 , m_closedContextSampleRate(-1)
114 , m_periodicWaveSine(nullptr) 116 , m_periodicWaveSine(nullptr)
115 , m_periodicWaveSquare(nullptr) 117 , m_periodicWaveSquare(nullptr)
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const 949 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const
948 { 950 {
949 if (getExecutionContext()) 951 if (getExecutionContext())
950 return getExecutionContext()->getSecurityOrigin(); 952 return getExecutionContext()->getSecurityOrigin();
951 953
952 return nullptr; 954 return nullptr;
953 } 955 }
954 956
955 } // namespace blink 957 } // namespace blink
956 958
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698