| Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.idl b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
|
| similarity index 71%
|
| copy from third_party/WebKit/Source/modules/webaudio/AudioContext.idl
|
| copy to third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
|
| index 7b528c55b63c280f579c36bdfe1624829b7fa0aa..ece0a47ce03479c9eeaf75c79d640e22e3909d8e 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/AudioContext.idl
|
| +++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
|
| @@ -1,28 +1,8 @@
|
| -/*
|
| - * Copyright (C) 2010, Google Inc. All rights reserved.
|
| - * Copyright (C) 2011 Apple Inc. All rights reserved.
|
| - *
|
| - * Redistribution and use in source and binary forms, with or without
|
| - * modification, are permitted provided that the following conditions
|
| - * are met:
|
| - * 1. Redistributions of source code must retain the above copyright
|
| - * notice, this list of conditions and the following disclaimer.
|
| - * 2. Redistributions in binary form must reproduce the above copyright
|
| - * notice, this list of conditions and the following disclaimer in the
|
| - * documentation and/or other materials provided with the distribution.
|
| - *
|
| - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
|
| - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| - * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
| - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
| - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| - */
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
|
|
| +// WebAudio spec: https://webaudio.github.io/web-audio-api/#BaseAudioContext
|
| enum AudioContextState {
|
| "suspended",
|
| "running",
|
| @@ -31,13 +11,9 @@ enum AudioContextState {
|
|
|
| [
|
| ActiveScriptWrappable,
|
| - Constructor,
|
| - ConstructorCallWith=Document,
|
| DependentLifetime,
|
| - ImplementedAs=BaseAudioContext,
|
| NoInterfaceObject,
|
| - RaisesException=Constructor,
|
| -] interface AudioContext : EventTarget {
|
| +] interface BaseAudioContext : EventTarget {
|
| // All rendered audio ultimately connects to destination, which represents the audio hardware.
|
| readonly attribute AudioDestinationNode destination;
|
|
|
| @@ -61,11 +37,6 @@ enum AudioContextState {
|
| // Sources
|
| [RaisesException, MeasureAs=AudioContextCreateBufferSource] AudioBufferSourceNode createBufferSource();
|
|
|
| - [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
|
| -
|
| - [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
|
| - [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaStreamAudioDestinationNode createMediaStreamDestination();
|
| -
|
| // Processing nodes
|
| [RaisesException, MeasureAs=AudioContextCreateGain] GainNode createGain();
|
| [RaisesException, MeasureAs=AudioContextCreateDelay] DelayNode createDelay(optional double maxDelayTime);
|
| @@ -92,5 +63,11 @@ enum AudioContextState {
|
| [MeasureAs=AudioContextSuspend, CallWith=ScriptState, ImplementedAs=suspendContext] Promise<void> suspend();
|
| [MeasureAs=AudioContextResume, CallWith=ScriptState, ImplementedAs=resumeContext] Promise<void> resume();
|
|
|
| + // TODO(rtoy): These really belong to the AudioContext, but we need them
|
| + // here so we can use an offline audio context to test these.
|
| + [RaisesException, MeasureAs=AudioContextCreateMediaElementSource] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
|
| + [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
|
| + [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaStreamAudioDestinationNode createMediaStreamDestination();
|
| +
|
| attribute EventHandler onstatechange;
|
| };
|
|
|