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

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

Issue 14520002: Web MIDI: implement MIDIInput (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reviewed Created 7 years, 8 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/MIDIInput.h ('k') | Source/modules/webmidi/MIDIInput.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIInput.cpp
diff --git a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp b/Source/modules/webmidi/MIDIInput.cpp
similarity index 76%
copy from Source/core/page/RuntimeEnabledFeaturesCustom.cpp
copy to Source/modules/webmidi/MIDIInput.cpp
index 2df390c281f06a8f6ea2157ba8be109616028eb0..36a1edcddf6cab63d95f97ff0dcf91ce7a219208 100644
--- a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp
+++ b/Source/modules/webmidi/MIDIInput.cpp
@@ -29,21 +29,18 @@
*/
#include "config.h"
-#include "RuntimeEnabledFeatures.h"
-
-#include "core/platform/graphics/MediaPlayer.h"
-#include "core/workers/SharedWorkerRepository.h"
+#include "modules/webmidi/MIDIInput.h"
namespace WebCore {
-bool RuntimeEnabledFeatures::mediaEnabled()
+PassRefPtr<MIDIInput> MIDIInput::create(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
{
- return MediaPlayer::isAvailable();
+ return adoptRef(new MIDIInput(context, id, manufacturer, name, version));
}
-bool RuntimeEnabledFeatures::sharedWorkerEnabled()
+MIDIInput::MIDIInput(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
+ : MIDIPort(context, id, manufacturer, name, MIDIPortTypeInput, version)
{
- return SharedWorkerRepository::isAvailable();
}
} // namespace WebCore
« no previous file with comments | « Source/modules/webmidi/MIDIInput.h ('k') | Source/modules/webmidi/MIDIInput.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698