Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp |
| diff --git a/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp b/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a2c97aa2786112e24ea28bc6e808b31c3b76fc4 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 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/mediasession/MediaArtwork.h" |
| + |
| +#include "core/dom/ExecutionContext.h" |
| +#include "modules/mediasession/MediaArtworkInit.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace blink { |
| + |
| +// static |
| +MediaArtwork* MediaArtwork::create(ExecutionContext* context, const MediaArtworkInit& artwork) |
| +{ |
| + return new MediaArtwork(context, artwork); |
| +} |
| + |
| +MediaArtwork::MediaArtwork(ExecutionContext* context, const MediaArtworkInit& artwork) |
| +{ |
| + KURL src = context->completeURL(artwork.src()); |
| + m_data.src = src; |
|
mlamouri (slow - plz ping)
2016/05/31 16:41:50
remove the temporary variable?
Zhiqiang Zhang (Slow)
2016/06/01 19:40:57
Done.
|
| + m_data.sizes = artwork.sizes(); |
| + m_data.type = artwork.type(); |
| +} |
| + |
| +String MediaArtwork::src() const |
| +{ |
| + return m_data.src; |
| +} |
| + |
| +String MediaArtwork::sizes() const |
| +{ |
| + return m_data.sizes; |
| +} |
| + |
| +String MediaArtwork::type() const |
| +{ |
| + return m_data.type; |
| +} |
| + |
| +} // namespace blink |