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

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: TODO: ActiveDOMObject 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
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.idl ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIPort.h
diff --git a/Source/modules/webmidi/MIDIPort.h b/Source/modules/webmidi/MIDIPort.h
index f089cb706f4955c42f8a9d20e4c069fae81d0dc2..12babafdc56aaab9827cad35a03cd99d89fe24f5 100644
--- a/Source/modules/webmidi/MIDIPort.h
+++ b/Source/modules/webmidi/MIDIPort.h
@@ -45,13 +45,14 @@ class MIDIPort : public RefCountedGarbageCollectedEventTargetWithInlineData<MIDI
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<MIDIPort>);
DEFINE_WRAPPERTYPEINFO();
public:
- enum MIDIPortTypeCode {
- MIDIPortTypeInput,
- MIDIPortTypeOutput
+ enum TypeCode {
+ TypeInput,
+ TypeOutput
};
virtual ~MIDIPort() { }
+ String connection() const;
String id() const { return m_id; }
String manufacturer() const { return m_manufacturer; }
String name() const { return m_name; }
@@ -75,19 +76,28 @@ public:
virtual ExecutionContext* executionContext() const override final;
protected:
- MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode, const String& version, MIDIAccessor::MIDIPortState);
+ MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, TypeCode, const String& version, MIDIAccessor::MIDIPortState);
private:
+ enum ConnectionState {
+ ConnectionStateOpen,
+ ConnectionStateClosed,
+ ConnectionStatePending
+ };
+
ScriptPromise accept(ScriptState*);
ScriptPromise reject(ScriptState*, ExceptionCode, const String& message);
+ void setStates(MIDIAccessor::MIDIPortState, ConnectionState);
+
String m_id;
String m_manufacturer;
String m_name;
- MIDIPortTypeCode m_type;
+ TypeCode m_type;
String m_version;
Member<MIDIAccess> m_access;
MIDIAccessor::MIDIPortState m_state;
+ ConnectionState m_connection;
};
} // namespace blink
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.idl ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698