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_NOTIFICATION_RESOURCES_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_NOTIFICATION_RESOURCES_H_ |
6 #define CONTENT_PUBLIC_COMMON_NOTIFICATION_RESOURCES_H_ | 6 #define CONTENT_PUBLIC_COMMON_NOTIFICATION_RESOURCES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 // Structure to hold the resources associated with a Web Notification. | 15 // Structure to hold the resources associated with a Web Notification. |
16 struct CONTENT_EXPORT NotificationResources { | 16 struct CONTENT_EXPORT NotificationResources { |
17 NotificationResources(); | 17 NotificationResources(); |
18 NotificationResources(const NotificationResources& other); | 18 NotificationResources(const NotificationResources& other); |
19 ~NotificationResources(); | 19 ~NotificationResources(); |
20 | 20 |
| 21 // Image for the notification. The bitmap may be empty if the developer did |
| 22 // not provide an image, or fetching of the image failed. |
| 23 SkBitmap image; |
| 24 |
21 // Main icon for the notification. The bitmap may be empty if the developer | 25 // Main icon for the notification. The bitmap may be empty if the developer |
22 // did not provide an icon, or fetching of the icon failed. | 26 // did not provide an icon, or fetching of the icon failed. |
23 SkBitmap notification_icon; | 27 SkBitmap notification_icon; |
24 | 28 |
25 // Badge for the notification. The bitmap may be empty if the developer | 29 // Badge for the notification. The bitmap may be empty if the developer |
26 // did not provide a badge, or fetching of the badge failed. | 30 // did not provide a badge, or fetching of the badge failed. |
27 SkBitmap badge; | 31 SkBitmap badge; |
28 | 32 |
29 // Icons for the actions. A bitmap may be empty if the developer did not | 33 // Icons for the actions. A bitmap may be empty if the developer did not |
30 // provide an icon, or fetching of the icon failed. | 34 // provide an icon, or fetching of the icon failed. |
31 std::vector<SkBitmap> action_icons; | 35 std::vector<SkBitmap> action_icons; |
32 }; | 36 }; |
33 | 37 |
34 } // namespace content | 38 } // namespace content |
35 | 39 |
36 #endif // CONTENT_PUBLIC_COMMON_NOTIFICATION_RESOURCES_H_ | 40 #endif // CONTENT_PUBLIC_COMMON_NOTIFICATION_RESOURCES_H_ |
OLD | NEW |