OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/blink/webmediacapabilitiesclient_impl.h" | 5 #include "media/blink/webmediacapabilitiesclient_impl.h" |
6 | 6 |
7 #include "third_party/WebKit/public/platform/modules/media_capabilities/WebMedia
DecodingAbility.h" | 7 #include "third_party/WebKit/public/platform/modules/media_capabilities/WebMedia
CapabilitiesInfo.h" |
8 | 8 |
9 namespace media { | 9 namespace media { |
10 | 10 |
11 WebMediaCapabilitiesClientImpl::WebMediaCapabilitiesClientImpl() = default; | 11 WebMediaCapabilitiesClientImpl::WebMediaCapabilitiesClientImpl() = default; |
12 | 12 |
13 WebMediaCapabilitiesClientImpl::~WebMediaCapabilitiesClientImpl() = default; | 13 WebMediaCapabilitiesClientImpl::~WebMediaCapabilitiesClientImpl() = default; |
14 | 14 |
15 void WebMediaCapabilitiesClientImpl::Query( | 15 void WebMediaCapabilitiesClientImpl::DecodingInfo( |
16 const blink::WebMediaConfiguration& configuration, | 16 const blink::WebMediaConfiguration& configuration, |
17 std::unique_ptr<blink::WebMediaCapabilitiesQueryCallbacks> callbacks) { | 17 std::unique_ptr<blink::WebMediaCapabilitiesQueryCallbacks> callbacks) { |
18 // TODO(chcunningham, mlamouri): this is a dummy implementation that returns | 18 // TODO(chcunningham, mlamouri): this is a dummy implementation that returns |
19 // true for all the fields. | 19 // true for all the fields. |
20 std::unique_ptr<blink::WebMediaDecodingAbility> ability( | 20 std::unique_ptr<blink::WebMediaCapabilitiesInfo> info( |
21 new blink::WebMediaDecodingAbility()); | 21 new blink::WebMediaCapabilitiesInfo()); |
22 ability->supported = true; | 22 info->supported = true; |
23 ability->smooth = true; | 23 info->smooth = true; |
24 ability->power_efficient = true; | 24 info->power_efficient = true; |
25 callbacks->OnSuccess(std::move(ability)); | 25 callbacks->OnSuccess(std::move(info)); |
26 } | 26 } |
27 | 27 |
28 } // namespace media | 28 } // namespace media |
OLD | NEW |