Chromium Code Reviews| Index: Source/modules/webmidi/MIDIOutput.h |
| diff --git a/Source/modules/webmidi/MIDIErrorCallback.h b/Source/modules/webmidi/MIDIOutput.h |
| similarity index 71% |
| copy from Source/modules/webmidi/MIDIErrorCallback.h |
| copy to Source/modules/webmidi/MIDIOutput.h |
| index 3a0e41edbee99b7c447866ce544afa475c131c10..047452b222d0cd1c5485fb97e499552ae0c3d279 100644 |
| --- a/Source/modules/webmidi/MIDIErrorCallback.h |
| +++ b/Source/modules/webmidi/MIDIOutput.h |
| @@ -28,26 +28,30 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef MIDIErrorCallback_h |
| -#define MIDIErrorCallback_h |
| +#ifndef MIDIOutput_h |
| +#define MIDIOutput_h |
| -#include "wtf/PassRefPtr.h" |
| -#include "wtf/RefCounted.h" |
| +#include "modules/webmidi/MIDIPort.h" |
| namespace WebCore { |
| -class DOMError; |
| class ScriptExecutionContext; |
| +class Uint8Array; |
| -class MIDIErrorCallback : public RefCounted<MIDIErrorCallback> { |
| +class MIDIOutput : public MIDIPort { |
| public: |
| - virtual ~MIDIErrorCallback() { } |
| - virtual bool handleEvent(DOMError*) = 0; |
| - // Helper to post callback task. |
| - void scheduleCallback(ScriptExecutionContext*, PassRefPtr<DOMError>); |
| + virtual ~MIDIOutput() { } |
| + static PassRefPtr<MIDIOutput> create(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version); |
| + static PassRefPtr<MIDIOutput> create(PassRefPtr<MIDIPort>); |
|
Chris Rogers
2013/04/29 19:24:19
Will this create() method be necessary? You have
Takashi Toyoshima
2013/05/02 09:14:08
I'll remove this due to the same reason of MIDIInp
|
| + |
| + void send(Uint8Array*, double timestamp = 0); |
| + void send(Vector<unsigned int>, double timestamp = 0); |
| + |
| +private: |
| + MIDIOutput(ScriptExecutionContext*, const String& id, const String& manufacturer, const String& name, const String& version); |
| }; |
| } // namespace WebCore |
| -#endif // MIDIErrorCallback_h |
| +#endif // MIDIOutput_h |