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

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

Issue 1043863002: Web MIDI: final IDL updates to conform the latest WD for shipping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: drop clear() for now, and add missing update on open_close test 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 f089cb706f4955c42f8a9d20e4c069fae81d0dc2..0e0807d82eba5667f64552ad9d7f053f45f90842 100644
--- a/Source/modules/webmidi/MIDIPort.h
+++ b/Source/modules/webmidi/MIDIPort.h
@@ -52,6 +52,7 @@ public:
virtual ~MIDIPort() { }
+ String connection() const;
String id() const { return m_id; }
String manufacturer() const { return m_manufacturer; }
String name() const { return m_name; }
@@ -78,9 +79,17 @@ protected:
MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode, const String& version, MIDIAccessor::MIDIPortState);
private:
+ enum MIDIPortConnectionState {
tkent 2015/03/30 23:16:30 nit: Because this is in MIDIPort class, you may om
Takashi Toyoshima 2015/03/31 01:19:48 Done.
+ MIDIPortConnectionStateOpen,
+ MIDIPortConnectionStateClosed,
+ MIDIPortConnectionStatePending
+ };
+
ScriptPromise accept(ScriptState*);
ScriptPromise reject(ScriptState*, ExceptionCode, const String& message);
+ void setStates(MIDIAccessor::MIDIPortState, MIDIPortConnectionState);
+
String m_id;
String m_manufacturer;
String m_name;
@@ -88,6 +97,7 @@ private:
String m_version;
Member<MIDIAccess> m_access;
MIDIAccessor::MIDIPortState m_state;
+ MIDIPortConnectionState m_connection;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698