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

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

Issue 2612003002: Media Session: use dictionary instead of an interface for MediaImage. (Closed)
Patch Set: rebase and remove one more file Created 3 years, 11 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/MediaMetadata.cpp
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp
index a3b93e1c3c2ce2c85782cb27ec1e0b50e8c7d27a..9fb4bdf1cf1767470c8141d0317591e4f6a69cb9 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp
+++ b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.cpp
@@ -23,8 +23,7 @@ MediaMetadata::MediaMetadata(ExecutionContext* context,
m_title = metadata.title();
m_artist = metadata.artist();
m_album = metadata.album();
- for (const auto& image : metadata.artwork())
- m_artwork.append(MediaImage::create(context, image));
+ m_artwork = metadata.artwork();
Zhiqiang Zhang (Slow) 2017/01/04 16:05:24 Create copies of MediaImages and freeze them if we
mlamouri (slow - plz ping) 2017/01/05 15:40:20 Done.
}
String MediaMetadata::title() const {
@@ -39,7 +38,7 @@ String MediaMetadata::album() const {
return m_album;
}
-const HeapVector<Member<MediaImage>>& MediaMetadata::artwork() const {
+const HeapVector<MediaImage>& MediaMetadata::artwork() const {
return m_artwork;
}
@@ -58,7 +57,7 @@ void MediaMetadata::setAlbum(const String& album) {
notifySessionAsync();
}
-void MediaMetadata::setArtwork(const HeapVector<Member<MediaImage>>& artwork) {
+void MediaMetadata::setArtwork(const HeapVector<MediaImage>& artwork) {
m_artwork = artwork;
notifySessionAsync();
}

Powered by Google App Engine
This is Rietveld 408576698