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

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

Issue 14520002: Web MIDI: implement MIDIInput (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/MIDIInput.cpp
diff --git a/Source/modules/inputmethod/Composition.cpp b/Source/modules/webmidi/MIDIInput.cpp
similarity index 69%
copy from Source/modules/inputmethod/Composition.cpp
copy to Source/modules/webmidi/MIDIInput.cpp
index 870e8ea20fe6e84711b12b2bfde5f8791f2645b3..a3b58f99c01c904e77f8d295686134cfcb94a517 100644
--- a/Source/modules/inputmethod/Composition.cpp
+++ b/Source/modules/webmidi/MIDIInput.cpp
@@ -29,25 +29,23 @@
*/
#include "config.h"
-#include "modules/inputmethod/Composition.h"
-
-#include "core/dom/Node.h"
-#include "core/dom/Range.h"
+#include "modules/webmidi/MIDIInput.h"
namespace WebCore {
-Composition::~Composition()
+PassRefPtr<MIDIInput> MIDIInput::create(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
{
+ return adoptRef(new MIDIInput(context, id, manufacturer, name, version));
}
-PassRefPtr<Composition> Composition::create(Node* text, Range* caret)
+PassRefPtr<MIDIInput> MIDIInput::create(PassRefPtr<MIDIPort> src)
{
- return adoptRef(new Composition(text, caret));
+ ASSERT(src->m_type == MIDIPortTypeInput);
Chris Rogers 2013/04/26 19:55:39 Please make a typeCode() method and use that inste
Takashi Toyoshima 2013/05/02 08:55:25 Done.
Takashi Toyoshima 2013/05/02 08:55:25 Oops. I don't need it any more because I removed c
+ return adoptRef(new MIDIInput(src->scriptExecutionContext(), src->id(), src->manufacturer(), src->name(), src->version()));
}
-Composition::Composition(Node* text, Range* caret)
- : m_text(text)
- , m_caret(caret)
+MIDIInput::MIDIInput(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
+ : MIDIPort(context, id, manufacturer, name, MIDIPortTypeInput, version)
{
}

Powered by Google App Engine
This is Rietveld 408576698