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

Side by Side Diff: third_party/WebKit/Source/modules/media_capabilities/MediaDecodingAbility.cpp

Issue 2706313002: Media Capabilities: add plumbing between Blink and media/blink/. (Closed)
Patch Set: oups Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 "modules/media_capabilities/MediaDecodingAbility.h" 5 #include "modules/media_capabilities/MediaDecodingAbility.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 MediaDecodingAbility::MediaDecodingAbility() = default; 9 // static
10 MediaDecodingAbility* MediaDecodingAbility::take(
11 ScriptPromiseResolver*,
12 std::unique_ptr<WebMediaDecodingAbility> webMediaDecodingAbility) {
13 DCHECK(webMediaDecodingAbility);
14 return new MediaDecodingAbility(std::move(webMediaDecodingAbility));
15 }
10 16
11 bool MediaDecodingAbility::supported() const { 17 bool MediaDecodingAbility::supported() const {
12 return true; 18 return m_webMediaDecodingAbility->supported;
13 } 19 }
14 20
15 bool MediaDecodingAbility::smooth() const { 21 bool MediaDecodingAbility::smooth() const {
16 return true; 22 return m_webMediaDecodingAbility->smooth;
17 } 23 }
18 24
19 bool MediaDecodingAbility::powerEfficient() const { 25 bool MediaDecodingAbility::powerEfficient() const {
20 return true; 26 return m_webMediaDecodingAbility->powerEfficient;
21 } 27 }
22 28
23 DEFINE_TRACE(MediaDecodingAbility) {} 29 DEFINE_TRACE(MediaDecodingAbility) {}
24 30
31 MediaDecodingAbility::MediaDecodingAbility(
32 std::unique_ptr<WebMediaDecodingAbility> webMediaDecodingAbility)
33 : m_webMediaDecodingAbility(std::move(webMediaDecodingAbility)) {}
34
25 } // namespace blink 35 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/media_capabilities/MediaDecodingAbility.h ('k') | third_party/WebKit/public/platform/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698