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

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 comments at #7 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
« Source/modules/webmidi/MIDIPort.h ('K') | « 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..81d2a2cceb04bd655242485becf2462e9aaab58c 100644
--- a/public/platform/WebMIDIAccessorClient.h
+++ b/public/platform/WebMIDIAccessorClient.h
@@ -37,9 +37,17 @@ namespace blink {
class WebMIDIAccessorClient {
public:
+ // FIXME: Remove deprecated interfaces that do not have |active| 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.
tkent 2014/10/20 05:54:07 nit: I recommend to wrap code comments in 80 colum
Takashi Toyoshima 2014/10/20 06:24:18 Done.
+ virtual void didAddInputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, bool active) = 0;
+ virtual void didAddOutputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version, bool active) = 0;
+ // didSetInputPortState() and didSetOutputPortState() should not be called until didStartSession() is called.
+ virtual void didSetInputPortState(unsigned portIndex, bool active) = 0;
+ virtual void didSetOutputPortState(unsigned portIndex, bool active) = 0;
+
virtual void didStartSession(bool success, const WebString& error, const WebString& message) = 0;
// |timeStamp| is in milliseconds according to the Web MIDI API.
« Source/modules/webmidi/MIDIPort.h ('K') | « Source/modules/webmidi/MIDIPort.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698