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 CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_DATABASE_DATA_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_DATABASE_DATA_H_ |
6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_DATABASE_DATA_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_DATABASE_DATA_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
johnme
2015/03/17 12:28:27
Remove
Peter Beverloo
2015/03/17 13:55:31
We use int64_t in this file.
| |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/common/platform_notification_data.h" | 11 #include "content/public/common/platform_notification_data.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 // Stores information about a Web Notification as available in the notification | 16 // Stores information about a Web Notification as available in the notification |
17 // database. Beyond the notification's own data, its id and attribution need | 17 // database. Beyond the notification's own data, its id and attribution need |
18 // to be available for users of the database as well. | 18 // to be available for users of the database as well. |
19 struct CONTENT_EXPORT NotificationDatabaseData { | 19 struct CONTENT_EXPORT NotificationDatabaseData { |
Peter Beverloo
2015/03/16 18:45:46
The //content API entry points for Web Notificatio
Avi (use Gerrit)
2015/03/16 22:29:50
I'm cool with that.
johnme
2015/03/17 12:28:27
I'm not sure if you still need CONTENT_EXPORT now?
Peter Beverloo
2015/03/17 13:55:31
It compiles and runs fine without it, so let's try
| |
20 NotificationDatabaseData(); | |
21 ~NotificationDatabaseData(); | |
22 | |
23 // Parses the serialized notification database data |input| into this object. | |
24 bool ParseFromString(const std::string& input); | |
25 | |
26 // Serializes the contents of this object to |output|. Returns if the data | |
27 // could be serialized successfully. | |
28 bool SerializeToString(std::string* output) const; | |
29 | |
30 // Id of the notification as allocated by the NotificationDatabase. | 20 // Id of the notification as allocated by the NotificationDatabase. |
31 int64_t notification_id; | 21 int64_t notification_id = 0; |
johnme
2015/03/17 12:28:27
int64 (ditto below)
Peter Beverloo
2015/03/17 13:55:31
No, we use int64_t in Chromium. int64 has been dep
| |
32 | 22 |
33 // Origin of the website this notification is associated with. | 23 // Origin of the website this notification is associated with. |
34 GURL origin; | 24 GURL origin; |
35 | 25 |
36 // Id of the Service Worker registration this notification is associated with. | 26 // Id of the Service Worker registration this notification is associated with. |
37 int64_t service_worker_registration_id; | 27 int64_t service_worker_registration_id = 0; |
38 | 28 |
39 // Platform data of the notification that's being stored. | 29 // Platform data of the notification that's being stored. |
40 PlatformNotificationData notification_data; | 30 PlatformNotificationData notification_data; |
41 }; | 31 }; |
42 | 32 |
43 } // namespace content | 33 } // namespace content |
44 | 34 |
45 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_DATABASE_DATA_H_ | 35 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_DATABASE_DATA_H_ |
OLD | NEW |