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

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

Issue 943173002: Web MIDI: dispatch MIDIConnectionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review #3 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/MIDIPort.h ('k') | Source/modules/webmidi/MIDIPort.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIPort.cpp
diff --git a/Source/modules/webmidi/MIDIPort.cpp b/Source/modules/webmidi/MIDIPort.cpp
index 240e570b21f10fa2de009ca011ba72c4b6584ff9..6364968167794e93a5d7d679263ddf5eb45ffcd0 100644
--- a/Source/modules/webmidi/MIDIPort.cpp
+++ b/Source/modules/webmidi/MIDIPort.cpp
@@ -32,6 +32,7 @@
#include "modules/webmidi/MIDIPort.h"
#include "modules/webmidi/MIDIAccess.h"
+#include "modules/webmidi/MIDIConnectionEvent.h"
namespace blink {
@@ -61,6 +62,12 @@ String MIDIPort::type() const
return emptyString();
}
+void MIDIPort::setActiveState(bool isActive)
+{
+ m_isActive = isActive;
+ dispatchEvent(MIDIConnectionEvent::create(this));
+}
+
ExecutionContext* MIDIPort::executionContext() const
{
return m_access->executionContext();
« no previous file with comments | « Source/modules/webmidi/MIDIPort.h ('k') | Source/modules/webmidi/MIDIPort.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698