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

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

Issue 14442004: Web MIDI: implement MIDIOutput (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cleanup2 Created 7 years, 8 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
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 014488a181c823a3b125195e26d09aff666bc95b..37493bb7b3f147884dfe85b6e80a44b4b728e275 100644
--- a/Source/core/css/CSSFontFaceLoadEvent.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -29,38 +29,34 @@
*/
#include "config.h"
-#include "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)
+PassRefPtr<MIDIOutput> MIDIOutput::create(PassRefPtr<MIDIPort> src)
{
- ScriptWrappable::init(this);
+ ASSERT(src->m_type == MIDIPortTypeOutput);
Chris Rogers 2013/04/29 19:24:19 seems better to make a public MIDIPort::typeCode()
Takashi Toyoshima 2013/05/02 09:14:08 I removed this create function. As a result, this
+ return adoptRef(new MIDIOutput(src->scriptExecutionContext(), src->id(), src->manufacturer(), src->name(), src->version()));
}
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, const CSSFontFaceLoadEventInit& initializer)
- : Event(type, initializer)
- , m_fontface(initializer.fontface)
- , m_error(initializer.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()
+void MIDIOutput::send(Uint8Array* data, double timestamp)
{
+ // FIXME: Implement me.
Chris Rogers 2013/04/29 19:24:19 I think it would be good to add a little more deta
Takashi Toyoshima 2013/05/02 09:14:08 Done.
}
-const AtomicString& CSSFontFaceLoadEvent::interfaceName() const
+void MIDIOutput::send(Vector<unsigned int>, double timestamp)
{
- return eventNames().interfaceForCSSFontFaceLoadEvent;
+ // FIXME: Implement me.
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698