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

Side by Side Diff: Source/modules/webaudio/OnlineAudioContext.h

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef OnlineAudioContext_h
6 #define OnlineAudioContext_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/webaudio/AudioContext.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 class Document;
16 class ExceptionState;
17 class ScriptState;
18
19 // This is an AudioContext which actually plays sound, unlike an
20 // OfflineAudioContext which renders sound into a buffer.
21 class OnlineAudioContext : public AudioContext {
Raymond Toy 2015/06/27 15:38:11 Would it be possible in this CL to rename AudioCon
22 public:
23 static AudioContext* create(Document&, ExceptionState&);
24
25 virtual ~OnlineAudioContext();
26 DECLARE_VIRTUAL_TRACE();
27
28 virtual ScriptPromise closeContext(ScriptState*) override final;
29 virtual bool isContextClosed() const override final;
30
31 virtual ScriptPromise suspendContext(ScriptState*) override final;
32 virtual ScriptPromise resumeContext(ScriptState*) override final;
33
34 virtual bool hasRealtimeConstraint() override final { return true; }
35
36 protected:
37 OnlineAudioContext(Document&);
38
39 virtual void didClose() override final;
40
41 private:
42 void stopRendering();
43
44 unsigned m_contextId;
45 RefPtrWillBeMember<ScriptPromiseResolver> m_closeResolver;
46 };
47
48 }
49
50 #endif // OnlineAudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698