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/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. |
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) | 28 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) | 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 , vibrate(vibrate) | 35 , vibrate(vibrate) |
35 , silent(silent) | 36 , silent(silent) |
36 , data(data) | 37 , data(data) |
37 { | 38 { |
38 } | 39 } |
39 | 40 |
| 41 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, con
st WebURL& sound, const WebVector<int>& vibrate, bool silent, const WebVector<ch
ar>& data) |
| 42 : title(title) |
| 43 , direction(direction) |
| 44 , lang(lang) |
| 45 , body(body) |
| 46 , tag(tag) |
| 47 , icon(icon) |
| 48 , sound(sound) |
| 49 , vibrate(vibrate) |
| 50 , silent(silent) |
| 51 , data(data) |
| 52 { |
| 53 } |
| 54 |
40 WebString title; | 55 WebString title; |
41 Direction direction; | 56 Direction direction; |
42 WebString lang; | 57 WebString lang; |
43 WebString body; | 58 WebString body; |
44 WebString tag; | 59 WebString tag; |
45 WebURL icon; | 60 WebURL icon; |
| 61 WebURL sound; |
46 WebVector<int> vibrate; | 62 WebVector<int> vibrate; |
47 bool silent; | 63 bool silent; |
48 WebVector<char> data; | 64 WebVector<char> data; |
49 }; | 65 }; |
50 | 66 |
51 } // namespace blink | 67 } // namespace blink |
52 | 68 |
53 #endif // WebNotificationData_h | 69 #endif // WebNotificationData_h |
OLD | NEW |