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

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

Issue 1095093002: Add layouttest for notification properties of persistent notification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 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 11
12 namespace blink { 12 namespace blink {
13 13
14 // Structure representing the data associated with a Web Notification. 14 // Structure representing the data associated with a Web Notification.
15 struct WebNotificationData { 15 struct WebNotificationData {
16 enum Direction { 16 enum Direction {
17 DirectionLeftToRight, 17 DirectionLeftToRight,
18 DirectionRightToLeft 18 DirectionRightToLeft
19 }; 19 };
20 20
21 WebNotificationData() 21 WebNotificationData()
22 : direction(DirectionLeftToRight) 22 : direction(DirectionLeftToRight)
23 , silent(false) 23 , silent(false)
24 { 24 {
25 } 25 }
26 26
27 // FIXME: Remove this constructor when Chromium has switched to the new one.
28 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent, const WebVector<char>& data)
29 : title(title)
30 , direction(direction)
31 , lang(lang)
32 , body(body)
33 , tag(tag)
34 , icon(icon)
35 , silent(silent)
36 , data(data)
37 {
38 }
39
40 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) 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)
41 : title(title) 28 : title(title)
42 , direction(direction) 29 , direction(direction)
43 , lang(lang) 30 , lang(lang)
44 , body(body) 31 , body(body)
45 , tag(tag) 32 , tag(tag)
46 , icon(icon) 33 , icon(icon)
47 , vibrate(vibrate) 34 , vibrate(vibrate)
48 , silent(silent) 35 , silent(silent)
49 , data(data) 36 , data(data)
50 { 37 {
51 } 38 }
52 39
53 WebString title; 40 WebString title;
54 Direction direction; 41 Direction direction;
55 WebString lang; 42 WebString lang;
56 WebString body; 43 WebString body;
57 WebString tag; 44 WebString tag;
58 WebURL icon; 45 WebURL icon;
59 WebVector<int> vibrate; 46 WebVector<int> vibrate;
60 bool silent; 47 bool silent;
61 WebVector<char> data; 48 WebVector<char> data;
62 }; 49 };
63 50
64 } // namespace blink 51 } // namespace blink
65 52
66 #endif // WebNotificationData_h 53 #endif // WebNotificationData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698