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

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

Issue 993893002: Add the data attribute to the Notification object (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
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/web/WebSerializedScriptValue.h"
Peter Beverloo 2015/03/12 20:30:46 public/platform/ (where this files live in) cannot
Sanghyun Park 2015/03/13 02:57:07 I refer the this document about this. [1] http://w
Sanghyun Park 2015/03/13 07:58:08 Oops. I'm misunderstanding, At first, I'll split t
10 11
11 namespace blink { 12 namespace blink {
12 13
13 // Structure representing the data associated with a Web Notification. 14 // Structure representing the data associated with a Web Notification.
14 struct WebNotificationData { 15 struct WebNotificationData {
15 enum Direction { 16 enum Direction {
16 DirectionLeftToRight, 17 DirectionLeftToRight,
17 DirectionRightToLeft 18 DirectionRightToLeft
18 }; 19 };
19 20
20 WebNotificationData() 21 WebNotificationData()
21 : direction(DirectionLeftToRight) 22 : direction(DirectionLeftToRight)
22 , silent(false) 23 , silent(false)
23 { 24 {
24 } 25 }
25 26
26 // FIXME: Remove this constructor when Chromium has switched to the new one. 27 // 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) 28 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon)
28 : title(title) 29 : title(title)
29 , direction(direction) 30 , direction(direction)
30 , lang(lang) 31 , lang(lang)
31 , body(body) 32 , body(body)
32 , tag(tag) 33 , tag(tag)
33 , icon(icon) 34 , icon(icon)
34 , silent(false) 35 , silent(false)
35 { 36 {
36 } 37 }
37 38
38 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent) 39 WebNotificationData(const WebString& title, Direction direction, const WebSt ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo l silent, const WebSerializedScriptValue& data)
39 : title(title) 40 : title(title)
40 , direction(direction) 41 , direction(direction)
41 , lang(lang) 42 , lang(lang)
42 , body(body) 43 , body(body)
43 , tag(tag) 44 , tag(tag)
44 , icon(icon) 45 , icon(icon)
45 , silent(silent) 46 , silent(silent)
47 , data(data)
46 { 48 {
47 } 49 }
48 50
49 WebString title; 51 WebString title;
50 Direction direction; 52 Direction direction;
51 WebString lang; 53 WebString lang;
52 WebString body; 54 WebString body;
53 WebString tag; 55 WebString tag;
54 WebURL icon; 56 WebURL icon;
55 bool silent; 57 bool silent;
58 WebSerializedScriptValue data;
56 }; 59 };
57 60
58 } // namespace blink 61 } // namespace blink
59 62
60 #endif // WebNotificationData_h 63 #endif // WebNotificationData_h
OLDNEW
« Source/modules/notifications/Notification.cpp ('K') | « Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698