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

Side by Side Diff: public/platform/modules/notifications/WebNotificationData.h

Issue 1005353002: Add data property in persistent web notification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/modules/notifications/ServiceWorkerRegistrationNotifications.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WebNotificationData_h 5 #ifndef WebNotificationData_h
6 #define WebNotificationData_h 6 #define WebNotificationData_h
7 7
8 #include "public/platform/WebString.h" 8 #include "public/platform/WebString.h"
9 #include "public/platform/WebURL.h" 9 #include "public/platform/WebURL.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // Structure representing the data associated with a Web Notification. 13 // Structure representing the data associated with a Web Notification.
14 struct WebNotificationData { 14 struct WebNotificationData {
15 enum Direction { 15 enum Direction {
16 DirectionLeftToRight, 16 DirectionLeftToRight,
17 DirectionRightToLeft 17 DirectionRightToLeft
18 }; 18 };
19 19
20 WebNotificationData() 20 WebNotificationData()
21 : direction(DirectionLeftToRight) 21 : direction(DirectionLeftToRight)
22 , silent(false) 22 , silent(false)
23 { 23 {
24 } 24 }
25 25
26 // FIXME: Remove this constructor when Chromium has switched to the new one.
26 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent) 27 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent)
27 : title(title) 28 : title(title)
28 , direction(direction) 29 , direction(direction)
29 , lang(lang) 30 , lang(lang)
30 , body(body) 31 , body(body)
31 , tag(tag) 32 , tag(tag)
32 , icon(icon) 33 , icon(icon)
33 , silent(silent) 34 , silent(silent)
34 { 35 {
35 } 36 }
36 37
38 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent, const WebString& data)
39 : title(title)
40 , direction(direction)
41 , lang(lang)
42 , body(body)
43 , tag(tag)
44 , icon(icon)
45 , silent(silent)
46 , data(data)
47 {
48 }
49
37 WebString title; 50 WebString title;
38 Direction direction; 51 Direction direction;
39 WebString lang; 52 WebString lang;
40 WebString body; 53 WebString body;
41 WebString tag; 54 WebString tag;
42 WebURL icon; 55 WebURL icon;
43 bool silent; 56 bool silent;
57 WebString data;
44 }; 58 };
45 59
46 } // namespace blink 60 } // namespace blink
47 61
48 #endif // WebNotificationData_h 62 #endif // WebNotificationData_h
OLDNEW
« no previous file with comments | « Source/modules/notifications/ServiceWorkerRegistrationNotifications.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698