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

Unified Diff: public/platform/WebMIDIAccessorClient.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/MIDIPort.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 0192a798a35ae6b898a3c01856ef3a75f4811edb..4503fa583ce4e38558bf4267aa7b0bd2f36a5065 100644
--- a/public/platform/WebMIDIAccessorClient.h
+++ b/public/platform/WebMIDIAccessorClient.h
@@ -37,9 +37,19 @@ namespace blink {
class WebMIDIAccessorClient {
public:
+ // FIXME: Remove deprecated interfaces that do not have |isActive| argument.
virtual void didAddInputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version) = 0;
virtual void didAddOutputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version) = 0;
+ // didAddInputPort() and didAddOutputPort() can be called before and after
+ // didStartSession() is called. But |id| should be unique in each function.
+ 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;
+ // didSetInputPortState() and didSetOutputPortState() should not be called
+ // until didStartSession() is called.
+ virtual void didSetInputPortState(unsigned portIndex, bool isActive) = 0;
+ virtual void didSetOutputPortState(unsigned portIndex, bool isActive) = 0;
+
virtual void didStartSession(bool success, const WebString& error, const WebString& message) = 0;
// |timeStamp| is in milliseconds according to the Web MIDI API.
« no previous file with comments | « Source/modules/webmidi/MIDIPort.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698