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

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

Issue 649683006: Web MIDI: add blink APIs to notify device connection events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address a comment at #21 Created 6 years, 2 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.cpp ('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 4e4f31fe262cd850c2f6371f4eb557ecc2c24d11..8530b36dcfeb60b83c236e095828adf0268410fe 100644
--- a/Source/modules/webmidi/MIDIPort.h
+++ b/Source/modules/webmidi/MIDIPort.h
@@ -57,6 +57,8 @@ public:
String version() const { return m_version; }
MIDIAccess* midiAccess() const { return m_access; }
+ bool isActive() const { return m_isActive; }
+ void setActiveState(bool isActive) { m_isActive = isActive; }
virtual void trace(Visitor*) override;
@@ -67,7 +69,7 @@ public:
virtual ExecutionContext* executionContext() const override final;
protected:
- MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode, const String& version);
+ MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const String& name, MIDIPortTypeCode, const String& version, bool isActive);
private:
String m_id;
@@ -76,6 +78,7 @@ private:
MIDIPortTypeCode m_type;
String m_version;
Member<MIDIAccess> m_access;
+ bool m_isActive;
};
} // namespace blink
« no previous file with comments | « Source/modules/webmidi/MIDIOutput.cpp ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698