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

Unified Diff: third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.h

Issue 2807713002: [Media Capabilities] Rename query() to decodingInfo() and MediaDecodingAbility to MediaCapabilities… (Closed)
Patch Set: review comments & rebase Created 3 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
Index: third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.h
diff --git a/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.h b/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..95320437e084be763c6ce857118330986a0faf64
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.h
@@ -0,0 +1,43 @@
+// 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.
+
+#ifndef MediaCapabilitiesInfo_h
+#define MediaCapabilitiesInfo_h
+
+#include <memory>
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "public/platform/modules/media_capabilities/WebMediaCapabilitiesInfo.h"
+
+namespace blink {
+
+class ScriptPromiseResolver;
+
+// Implementation of the MediaCapabilitiesInfo interface.
+class MediaCapabilitiesInfo final
+ : public GarbageCollectedFinalized<MediaCapabilitiesInfo>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ using WebType = std::unique_ptr<WebMediaCapabilitiesInfo>;
+ static MediaCapabilitiesInfo* Take(ScriptPromiseResolver*,
+ std::unique_ptr<WebMediaCapabilitiesInfo>);
+
+ bool supported() const;
+ bool smooth() const;
+ bool powerEfficient() const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ MediaCapabilitiesInfo() = delete;
+ explicit MediaCapabilitiesInfo(std::unique_ptr<WebMediaCapabilitiesInfo>);
+
+ std::unique_ptr<WebMediaCapabilitiesInfo> web_media_capabilities_info_;
+};
+
+} // namespace blink
+
+#endif // MediaCapabilitiesInfo_h

Powered by Google App Engine
This is Rietveld 408576698