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

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

Issue 1262893005: Add NotificationEvent.action property in SW events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@actions3_fix
Patch Set: Address review comments 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 | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | 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 #include "public/platform/modules/notifications/WebNotificationAction.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 // Structure representing the data associated with a Web Notification. 15 // Structure representing the data associated with a Web Notification.
16 struct WebNotificationData { 16 struct WebNotificationData {
17 enum Direction { 17 enum Direction {
18 DirectionLeftToRight, 18 DirectionLeftToRight,
19 DirectionRightToLeft, 19 DirectionRightToLeft,
20 DirectionAuto 20 DirectionAuto
21 }; 21 };
22 22
23 WebNotificationData() 23 WebNotificationData()
24 : direction(DirectionLeftToRight) 24 : direction(DirectionLeftToRight)
25 , silent(false) 25 , silent(false)
26 { 26 {
27 } 27 }
28 28
29 // FIXME: Remove this constructor when Chromium has switched to the new one.
30 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)
31 : title(title)
32 , direction(direction)
33 , lang(lang)
34 , body(body)
35 , tag(tag)
36 , icon(icon)
37 , vibrate(vibrate)
38 , silent(silent)
39 , data(data)
40 {
41 }
42
43 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) 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, const WebV ector<WebNotificationAction>& actions)
44 : title(title) 30 : title(title)
45 , direction(direction) 31 , direction(direction)
46 , lang(lang) 32 , lang(lang)
47 , body(body) 33 , body(body)
48 , tag(tag) 34 , tag(tag)
49 , icon(icon) 35 , icon(icon)
50 , vibrate(vibrate) 36 , vibrate(vibrate)
51 , silent(silent) 37 , silent(silent)
52 , data(data) 38 , data(data)
53 , actions(actions) 39 , actions(actions)
54 { 40 {
55 } 41 }
56 42
57 WebString title; 43 WebString title;
58 Direction direction; 44 Direction direction;
59 WebString lang; 45 WebString lang;
60 WebString body; 46 WebString body;
61 WebString tag; 47 WebString tag;
62 WebURL icon; 48 WebURL icon;
63 WebVector<int> vibrate; 49 WebVector<int> vibrate;
64 bool silent; 50 bool silent;
65 WebVector<char> data; 51 WebVector<char> data;
66 WebVector<WebNotificationAction> actions; 52 WebVector<WebNotificationAction> actions;
67 }; 53 };
68 54
69 } // namespace blink 55 } // namespace blink
70 56
71 #endif // WebNotificationData_h 57 #endif // WebNotificationData_h
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698