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

Side by Side Diff: third_party/WebKit/Source/modules/mediasession/MediaMetadata.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MediaMetadata_h 5 #ifndef MediaMetadata_h
6 #define MediaMetadata_h 6 #define MediaMetadata_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 #include "public/platform/modules/mediasession/WebMediaMetadata.h" 11 #include "public/platform/modules/mediasession/WebMediaMetadata.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class ExecutionContext;
16 class MediaArtwork;
15 class MediaMetadataInit; 17 class MediaMetadataInit;
16 18
17 // Implementation of MediaMetadata interface from the Media Session API. 19 // Implementation of MediaMetadata interface from the Media Session API.
18 class MODULES_EXPORT MediaMetadata final 20 class MODULES_EXPORT MediaMetadata final
19 : public GarbageCollectedFinalized<MediaMetadata> 21 : public GarbageCollectedFinalized<MediaMetadata>
20 , public ScriptWrappable { 22 , public ScriptWrappable {
21 DEFINE_WRAPPERTYPEINFO(); 23 DEFINE_WRAPPERTYPEINFO();
22 public: 24 public:
23 static MediaMetadata* create(const MediaMetadataInit&); 25 static MediaMetadata* create(ExecutionContext*, const MediaMetadataInit&);
24 26
25 String title() const; 27 String title() const;
26 String artist() const; 28 String artist() const;
27 String album() const; 29 String album() const;
30 HeapVector<Member<MediaArtwork>> artworks() const;
mlamouri (slow - plz ping) 2016/06/02 16:10:06 I think you should return a const ref.
Zhiqiang Zhang (Slow) 2016/06/03 16:07:31 Done.
28 31
29 WebMediaMetadata* data() { return &m_data; } 32 WebMediaMetadata* data() { return &m_data; }
30 33
31 DEFINE_INLINE_TRACE() { } 34 DEFINE_INLINE_TRACE() { }
32 35
33 private: 36 private:
34 MediaMetadata(const MediaMetadataInit&); 37 MediaMetadata(ExecutionContext*, const MediaMetadataInit&);
35 38
36 WebMediaMetadata m_data; 39 WebMediaMetadata m_data;
40 HeapVector<Member<MediaArtwork>> m_artworks;
37 }; 41 };
38 42
39 } // namespace blink 43 } // namespace blink
40 44
41 #endif // MediaMetadata_h 45 #endif // MediaMetadata_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698