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

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

Issue 1263043002: Add NotificationOptions.actions so websites can provide buttons (blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add to global-interface-listing*-expected.txt Created 5 years, 4 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 | « public/platform/modules/notifications/WebNotificationAction.h ('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 #include "public/platform/WebVector.h" 10 #include "public/platform/WebVector.h"
11 #include "public/platform/modules/notifications/WebNotificationAction.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 // Structure representing the data associated with a Web Notification. 15 // Structure representing the data associated with a Web Notification.
15 struct WebNotificationData { 16 struct WebNotificationData {
16 enum Direction { 17 enum Direction {
17 DirectionLeftToRight, 18 DirectionLeftToRight,
18 DirectionRightToLeft 19 DirectionRightToLeft
19 }; 20 };
20 21
21 WebNotificationData() 22 WebNotificationData()
22 : direction(DirectionLeftToRight) 23 : direction(DirectionLeftToRight)
23 , silent(false) 24 , silent(false)
24 { 25 {
25 } 26 }
26 27
28 // FIXME: Remove this constructor when Chromium has switched to the new one.
27 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, con st WebVector<int>& vibrate, bool silent, const WebVector<char>& data) 29 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, con st WebVector<int>& vibrate, bool silent, const WebVector<char>& data)
28 : title(title) 30 : title(title)
29 , direction(direction) 31 , direction(direction)
30 , lang(lang) 32 , lang(lang)
31 , body(body) 33 , body(body)
32 , tag(tag) 34 , tag(tag)
33 , icon(icon) 35 , icon(icon)
34 , vibrate(vibrate) 36 , vibrate(vibrate)
35 , silent(silent) 37 , silent(silent)
36 , data(data) 38 , data(data)
37 { 39 {
38 } 40 }
39 41
42 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, con st WebVector<int>& vibrate, bool silent, const WebVector<char>& data, const WebV ector<WebNotificationAction>& actions)
43 : title(title)
44 , direction(direction)
45 , lang(lang)
46 , body(body)
47 , tag(tag)
48 , icon(icon)
49 , vibrate(vibrate)
50 , silent(silent)
51 , data(data)
52 , actions(actions)
53 {
54 }
55
40 WebString title; 56 WebString title;
41 Direction direction; 57 Direction direction;
42 WebString lang; 58 WebString lang;
43 WebString body; 59 WebString body;
44 WebString tag; 60 WebString tag;
45 WebURL icon; 61 WebURL icon;
46 WebVector<int> vibrate; 62 WebVector<int> vibrate;
47 bool silent; 63 bool silent;
48 WebVector<char> data; 64 WebVector<char> data;
65 WebVector<WebNotificationAction> actions;
49 }; 66 };
50 67
51 } // namespace blink 68 } // namespace blink
52 69
53 #endif // WebNotificationData_h 70 #endif // WebNotificationData_h
OLDNEW
« no previous file with comments | « public/platform/modules/notifications/WebNotificationAction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698