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

Unified Diff: third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp

Issue 2013813002: Implement MediaMetadata artwork in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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..98985e8f1156dc86483487bd2e441b84a0d74217
--- /dev/null
+++ b/third_party/WebKit/Source/modules/mediasession/MediaArtwork.cpp
@@ -0,0 +1,41 @@
+// 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)
+{
+ m_data.src = context->completeURL(artwork.src());
+ 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

Powered by Google App Engine
This is Rietveld 408576698