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

Side by Side Diff: content/public/common/platform_notification_data.h

Issue 1750083004: Add badge to web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PLATFORM_NOTIFICATION_DATA_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
6 #define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_ 6 #define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Contents of the notification. 64 // Contents of the notification.
65 base::string16 body; 65 base::string16 body;
66 66
67 // Tag of the notification. Notifications sharing both their origin and their 67 // Tag of the notification. Notifications sharing both their origin and their
68 // tag will replace the first displayed notification. 68 // tag will replace the first displayed notification.
69 std::string tag; 69 std::string tag;
70 70
71 // URL of the icon which is to be displayed with the notification. 71 // URL of the icon which is to be displayed with the notification.
72 GURL icon; 72 GURL icon;
73 73
74 // URL of the badge for representing the notification. May be empty if no url
75 // was specified.
76 GURL badge;
77
74 // Vibration pattern for the notification, following the syntax of the 78 // Vibration pattern for the notification, following the syntax of the
75 // Vibration API. https://www.w3.org/TR/vibration/ 79 // Vibration API. https://www.w3.org/TR/vibration/
76 std::vector<int> vibration_pattern; 80 std::vector<int> vibration_pattern;
77 81
78 // The time at which the event the notification represents took place. 82 // The time at which the event the notification represents took place.
79 base::Time timestamp; 83 base::Time timestamp;
80 84
81 // Whether default notification indicators (sound, vibration, light) should 85 // Whether default notification indicators (sound, vibration, light) should
82 // be played again if the notification is replacing an older notification. 86 // be played again if the notification is replacing an older notification.
83 bool renotify = false; 87 bool renotify = false;
(...skipping 10 matching lines...) Expand all
94 // a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes. 98 // a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
95 std::vector<char> data; 99 std::vector<char> data;
96 100
97 // Actions that should be shown as buttons on the notification. 101 // Actions that should be shown as buttons on the notification.
98 std::vector<PlatformNotificationAction> actions; 102 std::vector<PlatformNotificationAction> actions;
99 }; 103 };
100 104
101 } // namespace content 105 } // namespace content
102 106
103 #endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_ 107 #endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
OLDNEW
« no previous file with comments | « content/public/common/notification_resources.h ('k') | content/test/data/notifications/48x48.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698