Index: third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.cpp |
diff --git a/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.cpp b/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..24ab610dfe791798e799682e3db04f9c0f9eb7dd |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/media_capabilities/MediaCapabilitiesInfo.cpp |
@@ -0,0 +1,35 @@ |
+// 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/media_capabilities/MediaCapabilitiesInfo.h" |
+ |
+namespace blink { |
+ |
+// static |
+MediaCapabilitiesInfo* MediaCapabilitiesInfo::Take( |
+ ScriptPromiseResolver*, |
+ std::unique_ptr<WebMediaCapabilitiesInfo> web_media_capabilities_info) { |
+ DCHECK(web_media_capabilities_info); |
+ return new MediaCapabilitiesInfo(std::move(web_media_capabilities_info)); |
+} |
+ |
+bool MediaCapabilitiesInfo::supported() const { |
+ return web_media_capabilities_info_->supported; |
+} |
+ |
+bool MediaCapabilitiesInfo::smooth() const { |
+ return web_media_capabilities_info_->smooth; |
+} |
+ |
+bool MediaCapabilitiesInfo::powerEfficient() const { |
+ return web_media_capabilities_info_->power_efficient; |
+} |
+ |
+DEFINE_TRACE(MediaCapabilitiesInfo) {} |
+ |
+MediaCapabilitiesInfo::MediaCapabilitiesInfo( |
+ std::unique_ptr<WebMediaCapabilitiesInfo> web_media_capabilities_info) |
+ : web_media_capabilities_info_(std::move(web_media_capabilities_info)) {} |
+ |
+} // namespace blink |