OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ |
6 #define CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ | 6 #define CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
9 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/common/manifest.h" |
10 | 13 |
11 namespace content { | 14 namespace content { |
12 | 15 |
13 // The MediaMetadata is a structure carrying information associated to a | 16 // The MediaMetadata is a structure carrying information associated to a |
14 // content::MediaSession. | 17 // content::MediaSession. |
15 struct CONTENT_EXPORT MediaMetadata { | 18 struct CONTENT_EXPORT MediaMetadata { |
| 19 // TODO(zqzhang): move |Manifest::Icon| to a common place. |
| 20 using Artwork = Manifest::Icon; |
| 21 |
16 MediaMetadata(); | 22 MediaMetadata(); |
17 ~MediaMetadata(); | 23 ~MediaMetadata(); |
18 | 24 |
19 bool operator==(const MediaMetadata& other) const; | 25 bool operator==(const MediaMetadata& other) const; |
20 bool operator!=(const MediaMetadata& other) const; | 26 bool operator!=(const MediaMetadata& other) const; |
21 | 27 |
22 // Title associated to the MediaSession. | 28 // Title associated to the MediaSession. |
23 base::string16 title; | 29 base::string16 title; |
24 | 30 |
25 // Artist associated to the MediaSession. | 31 // Artist associated to the MediaSession. |
26 base::string16 artist; | 32 base::string16 artist; |
27 | 33 |
28 // Album associated to the MediaSession. | 34 // Album associated to the MediaSession. |
29 base::string16 album; | 35 base::string16 album; |
30 | 36 |
| 37 std::vector<Artwork> artwork; |
| 38 |
31 // Maximum length for all the strings inside the MediaMetadata when it is sent | 39 // Maximum length for all the strings inside the MediaMetadata when it is sent |
32 // over IPC. The renderer process should truncate the strings before sending | 40 // over IPC. The renderer process should truncate the strings before sending |
33 // the MediaMetadata and the browser process must do the same when receiving | 41 // the MediaMetadata and the browser process must do the same when receiving |
34 // it. | 42 // it. |
35 static const size_t kMaxIPCStringLength; | 43 static const size_t kMaxIPCStringLength; |
36 }; | 44 }; |
37 | 45 |
38 } // namespace content | 46 } // namespace content |
39 | 47 |
40 #endif // CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ | 48 #endif // CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_ |
OLD | NEW |