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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioContext.h

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 3 years, 12 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 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AudioContext_h 5 #ifndef AudioContext_h
6 #define AudioContext_h 6 #define AudioContext_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/webaudio/BaseAudioContext.h" 10 #include "modules/webaudio/BaseAudioContext.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class AudioTimestamp;
15 class Document; 16 class Document;
16 class ExceptionState; 17 class ExceptionState;
17 class ScriptState; 18 class ScriptState;
18 19
19 // This is an BaseAudioContext which actually plays sound, unlike an 20 // This is an BaseAudioContext which actually plays sound, unlike an
20 // OfflineAudioContext which renders sound into a buffer. 21 // OfflineAudioContext which renders sound into a buffer.
21 class AudioContext : public BaseAudioContext { 22 class AudioContext : public BaseAudioContext {
22 DEFINE_WRAPPERTYPEINFO(); 23 DEFINE_WRAPPERTYPEINFO();
23 24
24 public: 25 public:
25 static AudioContext* create(Document&, ExceptionState&); 26 static AudioContext* create(Document&, ExceptionState&);
26 27
27 ~AudioContext() override; 28 ~AudioContext() override;
28 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
29 30
30 ScriptPromise closeContext(ScriptState*); 31 ScriptPromise closeContext(ScriptState*);
31 bool isContextClosed() const final; 32 bool isContextClosed() const final;
32 33
33 ScriptPromise suspendContext(ScriptState*) final; 34 ScriptPromise suspendContext(ScriptState*) final;
34 ScriptPromise resumeContext(ScriptState*) final; 35 ScriptPromise resumeContext(ScriptState*) final;
35 36
36 bool hasRealtimeConstraint() final { return true; } 37 bool hasRealtimeConstraint() final { return true; }
37 38
39 void getOutputTimestamp(ScriptState*, AudioTimestamp&);
40
38 protected: 41 protected:
39 AudioContext(Document&); 42 AudioContext(Document&);
40 43
41 void didClose() final; 44 void didClose() final;
42 45
43 private: 46 private:
44 void stopRendering(); 47 void stopRendering();
45 48
46 unsigned m_contextId; 49 unsigned m_contextId;
47 Member<ScriptPromiseResolver> m_closeResolver; 50 Member<ScriptPromiseResolver> m_closeResolver;
48 }; 51 };
49 52
50 } // namespace blink 53 } // namespace blink
51 54
52 #endif // AudioContext_h 55 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/modules_idl_files.gni ('k') | third_party/WebKit/Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698