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

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

Issue 2713793004: Add dictionary for OfflineAudioContext constructor (Closed)
Patch Set: Rebase Created 3 years, 5 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 15 matching lines...) Expand all
26 #ifndef OfflineAudioContext_h 26 #ifndef OfflineAudioContext_h
27 #define OfflineAudioContext_h 27 #define OfflineAudioContext_h
28 28
29 #include "modules/ModulesExport.h" 29 #include "modules/ModulesExport.h"
30 #include "modules/webaudio/BaseAudioContext.h" 30 #include "modules/webaudio/BaseAudioContext.h"
31 #include "platform/wtf/HashMap.h" 31 #include "platform/wtf/HashMap.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class ExceptionState; 35 class ExceptionState;
36 class OfflineAudioContextOptions;
36 class OfflineAudioDestinationHandler; 37 class OfflineAudioDestinationHandler;
37 38
38 class MODULES_EXPORT OfflineAudioContext final : public BaseAudioContext { 39 class MODULES_EXPORT OfflineAudioContext final : public BaseAudioContext {
39 DEFINE_WRAPPERTYPEINFO(); 40 DEFINE_WRAPPERTYPEINFO();
40 41
41 public: 42 public:
42 static OfflineAudioContext* Create(ExecutionContext*, 43 static OfflineAudioContext* Create(ExecutionContext*,
43 unsigned number_of_channels, 44 unsigned number_of_channels,
44 unsigned number_of_frames, 45 unsigned number_of_frames,
45 float sample_rate, 46 float sample_rate,
46 ExceptionState&); 47 ExceptionState&);
47 48
49 static OfflineAudioContext* Create(ExecutionContext*,
50 const OfflineAudioContextOptions&,
51 ExceptionState&);
52
48 ~OfflineAudioContext() override; 53 ~OfflineAudioContext() override;
49 54
50 DECLARE_VIRTUAL_TRACE(); 55 DECLARE_VIRTUAL_TRACE();
51 56
52 size_t length() const { return total_render_frames_; } 57 size_t length() const { return total_render_frames_; }
53 58
54 ScriptPromise startOfflineRendering(ScriptState*); 59 ScriptPromise startOfflineRendering(ScriptState*);
55 60
56 ScriptPromise suspendContext(ScriptState*, double); 61 ScriptPromise suspendContext(ScriptState*, double);
57 ScriptPromise resumeContext(ScriptState*) final; 62 ScriptPromise resumeContext(ScriptState*) final;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // state when the context is suspended. 130 // state when the context is suspended.
126 bool is_rendering_started_; 131 bool is_rendering_started_;
127 132
128 // Total render sample length. 133 // Total render sample length.
129 size_t total_render_frames_; 134 size_t total_render_frames_;
130 }; 135 };
131 136
132 } // namespace blink 137 } // namespace blink
133 138
134 #endif // OfflineAudioContext_h 139 #endif // OfflineAudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698