OLD | NEW |
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/modules/notifications/WebNotificationVibrationData.h" |
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, boo
l silent) | 28 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo
l silent) |
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(silent) | 35 , silent(silent) |
35 { | 36 { |
36 } | 37 } |
37 | 38 |
| 39 // FIXME: Remove this constructor when Chromium has switched to the new one. |
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) | 40 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) | 41 : title(title) |
40 , direction(direction) | 42 , direction(direction) |
41 , lang(lang) | 43 , lang(lang) |
42 , body(body) | 44 , body(body) |
43 , tag(tag) | 45 , tag(tag) |
44 , icon(icon) | 46 , icon(icon) |
45 , silent(silent) | 47 , silent(silent) |
46 , data(data) | 48 , data(data) |
47 { | 49 { |
48 } | 50 } |
49 | 51 |
| 52 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, con
st WebNotificationVibrationData& vibrate, bool silent, const WebString& data) |
| 53 : title(title) |
| 54 , direction(direction) |
| 55 , lang(lang) |
| 56 , body(body) |
| 57 , tag(tag) |
| 58 , icon(icon) |
| 59 , vibrate(vibrate) |
| 60 , silent(silent) |
| 61 , data(data) |
| 62 { |
| 63 } |
| 64 |
50 WebString title; | 65 WebString title; |
51 Direction direction; | 66 Direction direction; |
52 WebString lang; | 67 WebString lang; |
53 WebString body; | 68 WebString body; |
54 WebString tag; | 69 WebString tag; |
55 WebURL icon; | 70 WebURL icon; |
| 71 WebNotificationVibrationData vibrate; |
56 bool silent; | 72 bool silent; |
57 WebString data; | 73 WebString data; |
58 }; | 74 }; |
59 | 75 |
60 } // namespace blink | 76 } // namespace blink |
61 | 77 |
62 #endif // WebNotificationData_h | 78 #endif // WebNotificationData_h |
OLD | NEW |