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

Unified Diff: public/platform/WebMIDIAccessorClient.h

Issue 942243002: Web MIDI: blink API update to support MIDIPortState (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/MIDIAccessor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMIDIAccessorClient.h
diff --git a/public/platform/WebMIDIAccessorClient.h b/public/platform/WebMIDIAccessorClient.h
index 04082f0f7d2a382eea47907128df597dac3ebbc3..08efc5e953073d71c7083be80085ded720166b71 100644
--- a/public/platform/WebMIDIAccessorClient.h
+++ b/public/platform/WebMIDIAccessorClient.h
@@ -37,14 +37,26 @@ namespace blink {
class WebMIDIAccessorClient {
public:
+ enum MIDIPortState {
+ MIDIPortStateDisconnected,
+ MIDIPortStateConnected,
+ MIDIPortStateOpened,
+ };
+
// didAddInputPort() and didAddOutputPort() can be called before and after
// didStartSession() is called. But |id| should be unique in each function.
+ // FIXME: Remove obsolete interfaces that use isActive.
virtual void didAddInputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, bool isActive) = 0;
virtual void didAddOutputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, bool isActive) = 0;
+ virtual void didAddInputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, MIDIPortState) = 0;
+ virtual void didAddOutputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, MIDIPortState) = 0;
// didSetInputPortState() and didSetOutputPortState() should not be called
// until didStartSession() is called.
+ // FIXME: Remove obsolete interfaces that use isActive.
virtual void didSetInputPortState(unsigned portIndex, bool isActive) = 0;
virtual void didSetOutputPortState(unsigned portIndex, bool isActive) = 0;
+ virtual void didSetInputPortState(unsigned portIndex, MIDIPortState) = 0;
+ virtual void didSetOutputPortState(unsigned portIndex, MIDIPortState) = 0;
virtual void didStartSession(bool success, const WebString& error, const WebString& message) = 0;
« no previous file with comments | « Source/modules/webmidi/MIDIAccessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698