OLD | NEW |
---|---|
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 #include "wtf/text/WTFString.h" | |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
16 class ExecutionContext; | |
17 class MediaArtwork; | |
15 class MediaMetadataInit; | 18 class MediaMetadataInit; |
16 | 19 |
17 // Implementation of MediaMetadata interface from the Media Session API. | 20 // Implementation of MediaMetadata interface from the Media Session API. |
18 class MODULES_EXPORT MediaMetadata final | 21 class MODULES_EXPORT MediaMetadata final |
19 : public GarbageCollectedFinalized<MediaMetadata> | 22 : public GarbageCollectedFinalized<MediaMetadata> |
20 , public ScriptWrappable { | 23 , public ScriptWrappable { |
21 DEFINE_WRAPPERTYPEINFO(); | 24 DEFINE_WRAPPERTYPEINFO(); |
22 public: | 25 public: |
23 static MediaMetadata* create(const MediaMetadataInit&); | 26 static MediaMetadata* create(ExecutionContext*, const MediaMetadataInit&); |
24 | 27 |
25 String title() const; | 28 String title() const; |
26 String artist() const; | 29 String artist() const; |
27 String album() const; | 30 String album() const; |
31 const HeapVector<Member<MediaArtwork>>& artworks() const; | |
28 | 32 |
29 WebMediaMetadata* data() { return &m_data; } | 33 operator WebMediaMetadata() const; |
mlamouri (slow - plz ping)
2016/06/08 13:06:18
explicit operator maybe?
Zhiqiang Zhang (Slow)
2016/06/09 15:30:13
Done.
| |
30 | 34 |
31 DEFINE_INLINE_TRACE() { } | 35 DECLARE_VIRTUAL_TRACE(); |
32 | 36 |
33 private: | 37 private: |
34 MediaMetadata(const MediaMetadataInit&); | 38 MediaMetadata(ExecutionContext*, const MediaMetadataInit&); |
35 | 39 |
36 WebMediaMetadata m_data; | 40 String m_title; |
41 String m_artist; | |
42 String m_album; | |
43 HeapVector<Member<MediaArtwork>> m_artworks; | |
37 }; | 44 }; |
38 | 45 |
39 } // namespace blink | 46 } // namespace blink |
40 | 47 |
41 #endif // MediaMetadata_h | 48 #endif // MediaMetadata_h |
OLD | NEW |