| 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 "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class ExecutionContext; | 15 class ExecutionContext; |
| 16 class MediaArtwork; | 16 class MediaImage; |
| 17 class MediaMetadataInit; | 17 class MediaMetadataInit; |
| 18 | 18 |
| 19 // Implementation of MediaMetadata interface from the Media Session API. | 19 // Implementation of MediaMetadata interface from the Media Session API. |
| 20 class MODULES_EXPORT MediaMetadata final | 20 class MODULES_EXPORT MediaMetadata final |
| 21 : public GarbageCollectedFinalized<MediaMetadata>, | 21 : public GarbageCollectedFinalized<MediaMetadata>, |
| 22 public ScriptWrappable { | 22 public ScriptWrappable { |
| 23 DEFINE_WRAPPERTYPEINFO(); | 23 DEFINE_WRAPPERTYPEINFO(); |
| 24 | 24 |
| 25 public: | 25 public: |
| 26 static MediaMetadata* create(ExecutionContext*, const MediaMetadataInit&); | 26 static MediaMetadata* create(ExecutionContext*, const MediaMetadataInit&); |
| 27 | 27 |
| 28 String title() const; | 28 String title() const; |
| 29 String artist() const; | 29 String artist() const; |
| 30 String album() const; | 30 String album() const; |
| 31 const HeapVector<Member<MediaArtwork>>& artwork() const; | 31 const HeapVector<Member<MediaImage>>& artwork() const; |
| 32 | 32 |
| 33 DECLARE_VIRTUAL_TRACE(); | 33 DECLARE_VIRTUAL_TRACE(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 MediaMetadata(ExecutionContext*, const MediaMetadataInit&); | 36 MediaMetadata(ExecutionContext*, const MediaMetadataInit&); |
| 37 | 37 |
| 38 String m_title; | 38 String m_title; |
| 39 String m_artist; | 39 String m_artist; |
| 40 String m_album; | 40 String m_album; |
| 41 HeapVector<Member<MediaArtwork>> m_artwork; | 41 HeapVector<Member<MediaImage>> m_artwork; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif // MediaMetadata_h | 46 #endif // MediaMetadata_h |
| OLD | NEW |