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

Unified Diff: third_party/WebKit/Source/modules/mediacapabilities/MediaCapabilities.cpp

Issue 2685863004: Media Capabilities: stub implementation of mediaCapabilities.query(). (Closed)
Patch Set: rebase Created 3 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
Index: third_party/WebKit/Source/modules/mediacapabilities/MediaCapabilities.cpp
diff --git a/third_party/WebKit/Source/modules/mediacapabilities/MediaCapabilities.cpp b/third_party/WebKit/Source/modules/mediacapabilities/MediaCapabilities.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e338381636aa2e38f390dd8a1b3ef774d1ea768d
--- /dev/null
+++ b/third_party/WebKit/Source/modules/mediacapabilities/MediaCapabilities.cpp
@@ -0,0 +1,28 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "modules/mediacapabilities/MediaCapabilities.h"
+
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "bindings/core/v8/ScriptState.h"
+#include "modules/mediacapabilities/MediaConfiguration.h"
+#include "modules/mediacapabilities/MediaDecodingAbility.h"
+
+namespace blink {
+
+MediaCapabilities::MediaCapabilities() = default;
+
+ScriptPromise MediaCapabilities::query(
+ ScriptState* scriptState,
+ const MediaConfiguration& configuration) {
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromise promise = resolver->promise();
+ resolver->resolve(new MediaDecodingAbility());
+ return promise;
+}
+
+DEFINE_TRACE(MediaCapabilities) {}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698