OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MediaCapabilitiesInfo_h |
| 6 #define MediaCapabilitiesInfo_h |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "bindings/core/v8/ScriptWrappable.h" |
| 11 #include "public/platform/modules/media_capabilities/WebMediaCapabilitiesInfo.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class ScriptPromiseResolver; |
| 16 |
| 17 // Implementation of the MediaCapabilitiesInfo interface. |
| 18 class MediaCapabilitiesInfo final |
| 19 : public GarbageCollectedFinalized<MediaCapabilitiesInfo>, |
| 20 public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 |
| 23 public: |
| 24 using WebType = std::unique_ptr<WebMediaCapabilitiesInfo>; |
| 25 static MediaCapabilitiesInfo* Take(ScriptPromiseResolver*, |
| 26 std::unique_ptr<WebMediaCapabilitiesInfo>); |
| 27 |
| 28 bool supported() const; |
| 29 bool smooth() const; |
| 30 bool powerEfficient() const; |
| 31 |
| 32 DECLARE_VIRTUAL_TRACE(); |
| 33 |
| 34 private: |
| 35 MediaCapabilitiesInfo() = delete; |
| 36 explicit MediaCapabilitiesInfo(std::unique_ptr<WebMediaCapabilitiesInfo>); |
| 37 |
| 38 std::unique_ptr<WebMediaCapabilitiesInfo> web_media_capabilities_info_; |
| 39 }; |
| 40 |
| 41 } // namespace blink |
| 42 |
| 43 #endif // MediaCapabilitiesInfo_h |
OLD | NEW |