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

Unified Diff: Source/modules/webmidi/MIDIOutput.cpp

Issue 14442004: Web MIDI: implement MIDIOutput (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NoInterfaceObject Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.h ('k') | Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/core/css/CSSFontFaceLoadEvent.cpp b/Source/modules/webmidi/MIDIOutput.cpp
similarity index 64%
copy from Source/core/css/CSSFontFaceLoadEvent.cpp
copy to Source/modules/webmidi/MIDIOutput.cpp
index 80ca0c9b0a27dd55d75448736ed30f092f0f5385..c3caecbad1d20b5e291d0160fd3419561d2b8d38 100644
--- a/Source/core/css/CSSFontFaceLoadEvent.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -29,38 +29,31 @@
*/
#include "config.h"
-#include "core/css/CSSFontFaceLoadEvent.h"
+#include "modules/webmidi/MIDIOutput.h"
namespace WebCore {
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent()
+PassRefPtr<MIDIOutput> MIDIOutput::create(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
{
- ScriptWrappable::init(this);
+ return adoptRef(new MIDIOutput(context, id, manufacturer, name, version));
}
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, PassRefPtr<CSSFontFaceRule> fontface, PassRefPtr<DOMError> error)
- : Event(type, false, false)
- , m_fontface(fontface)
- , m_error(error)
+MIDIOutput::MIDIOutput(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
+ : MIDIPort(context, id, manufacturer, name, MIDIPortTypeOutput, version)
{
- ScriptWrappable::init(this);
}
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, const CSSFontFaceLoadEventInit& initializer)
- : Event(type, initializer)
- , m_fontface(initializer.fontface)
- , m_error(initializer.error)
+void MIDIOutput::send(Uint8Array* data, double timestamp)
{
- ScriptWrappable::init(this);
+ // FIXME: Implement MIDI protocol validation here. System exclusive
+ // messages must be checked at the same time.
+ // Actual sending operation will be implemented in core/platform/midi.
}
-CSSFontFaceLoadEvent::~CSSFontFaceLoadEvent()
+void MIDIOutput::send(Vector<unsigned>, double timestamp)
{
-}
-
-const AtomicString& CSSFontFaceLoadEvent::interfaceName() const
-{
- return eventNames().interfaceForCSSFontFaceLoadEvent;
+ // FIXME: Ditto. Implementation will be shared between these two send
+ // functions.
}
} // namespace WebCore
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.h ('k') | Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698