Chromium Code Reviews| 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 #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) |
|
Peter Beverloo
2015/08/26 15:28:59
nit: could remove this too if you use in-class ini
johnme
2015/08/26 15:32:43
Nice, done.
| |
| 25 , silent(false) | 25 , silent(false) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| 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) | |
| 30 : title(title) | |
| 31 , direction(direction) | |
| 32 , lang(lang) | |
| 33 , body(body) | |
| 34 , tag(tag) | |
| 35 , icon(icon) | |
| 36 , vibrate(vibrate) | |
| 37 , silent(silent) | |
| 38 , data(data) | |
| 39 , actions(actions) | |
| 40 { | |
| 41 } | |
| 42 | |
| 43 WebString title; | 29 WebString title; |
| 44 Direction direction; | 30 Direction direction; |
| 45 WebString lang; | 31 WebString lang; |
| 46 WebString body; | 32 WebString body; |
| 47 WebString tag; | 33 WebString tag; |
| 48 WebURL icon; | 34 WebURL icon; |
| 49 WebVector<int> vibrate; | 35 WebVector<int> vibrate; |
| 50 bool silent; | 36 bool silent; |
| 51 WebVector<char> data; | 37 WebVector<char> data; |
| 52 WebVector<WebNotificationAction> actions; | 38 WebVector<WebNotificationAction> actions; |
| 53 }; | 39 }; |
| 54 | 40 |
| 55 } // namespace blink | 41 } // namespace blink |
| 56 | 42 |
| 57 #endif // WebNotificationData_h | 43 #endif // WebNotificationData_h |
| OLD | NEW |