| Index: Source/modules/webmidi/MIDIInput.h
|
| diff --git a/Source/modules/webmidi/MIDIErrorCallback.h b/Source/modules/webmidi/MIDIInput.h
|
| similarity index 71%
|
| copy from Source/modules/webmidi/MIDIErrorCallback.h
|
| copy to Source/modules/webmidi/MIDIInput.h
|
| index 3a0e41edbee99b7c447866ce544afa475c131c10..eb283ecc2e7c5a041014b31105a64ce1bbb362cb 100644
|
| --- a/Source/modules/webmidi/MIDIErrorCallback.h
|
| +++ b/Source/modules/webmidi/MIDIInput.h
|
| @@ -28,26 +28,30 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef MIDIErrorCallback_h
|
| -#define MIDIErrorCallback_h
|
| +#ifndef MIDIInput_h
|
| +#define MIDIInput_h
|
|
|
| -#include "wtf/PassRefPtr.h"
|
| -#include "wtf/RefCounted.h"
|
| +#include "core/dom/EventTarget.h"
|
| +#include "modules/webmidi/MIDIPort.h"
|
|
|
| namespace WebCore {
|
|
|
| -class DOMError;
|
| class ScriptExecutionContext;
|
|
|
| -class MIDIErrorCallback : public RefCounted<MIDIErrorCallback> {
|
| +class MIDIInput : public MIDIPort {
|
| public:
|
| - virtual ~MIDIErrorCallback() { }
|
| - virtual bool handleEvent(DOMError*) = 0;
|
| + static PassRefPtr<MIDIInput> create(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
|
| + virtual ~MIDIInput() { }
|
|
|
| - // Helper to post callback task.
|
| - void scheduleCallback(ScriptExecutionContext*, PassRefPtr<DOMError>);
|
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(midimessage);
|
| +
|
| + // EventTarget
|
| + virtual const AtomicString& interfaceName() const OVERRIDE { return eventNames().interfaceForMIDIInput; }
|
| +
|
| +private:
|
| + MIDIInput(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version);
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // MIDIErrorCallback_h
|
| +#endif // MIDIInput_h
|
|
|