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

Unified Diff: Source/modules/webmidi/MIDIPort.h

Issue 1051903002: Web MIDI: implement implicit open() on send() and setOnmidimessage() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/MIDIPort.h
diff --git a/Source/modules/webmidi/MIDIPort.h b/Source/modules/webmidi/MIDIPort.h
index 12babafdc56aaab9827cad35a03cd99d89fe24f5..5c0c0fc2c3469043b92e10957748c1f0246db685 100644
--- a/Source/modules/webmidi/MIDIPort.h
+++ b/Source/modules/webmidi/MIDIPort.h
@@ -76,15 +76,18 @@ public:
virtual ExecutionContext* executionContext() const override final;
protected:
- MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, TypeCode, const String& version, MIDIAccessor::MIDIPortState);
-
-private:
enum ConnectionState {
ConnectionStateOpen,
ConnectionStateClosed,
ConnectionStatePending
};
+ MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, TypeCode, const String& version, MIDIAccessor::MIDIPortState);
+ ConnectionState getConnection() const { return m_connection; }
yhirano 2015/04/02 02:15:10 I think this function can be public.
Takashi Toyoshima 2015/04/02 04:03:21 Done.
+
+ void open();
+
+private:
ScriptPromise accept(ScriptState*);
ScriptPromise reject(ScriptState*, ExceptionCode, const String& message);

Powered by Google App Engine
This is Rietveld 408576698