| 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 // 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) | |
| 29 : title(title) | |
| 30 , direction(direction) | |
| 31 , lang(lang) | |
| 32 , body(body) | |
| 33 , tag(tag) | |
| 34 , icon(icon) | |
| 35 , silent(silent) | |
| 36 { | |
| 37 } | |
| 38 | |
| 39 // FIXME: Remove this constructor when Chromium has switched to the new one. | |
| 40 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) | 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) |
| 41 : title(title) | 29 : title(title) |
| 42 , direction(direction) | 30 , direction(direction) |
| 43 , lang(lang) | 31 , lang(lang) |
| 44 , body(body) | 32 , body(body) |
| 45 , tag(tag) | 33 , tag(tag) |
| 46 , icon(icon) | 34 , icon(icon) |
| 47 , silent(silent) | 35 , silent(silent) |
| 48 , data(data) | 36 , data(data) |
| 49 { | 37 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 69 WebString tag; | 57 WebString tag; |
| 70 WebURL icon; | 58 WebURL icon; |
| 71 WebVector<unsigned> vibrate; | 59 WebVector<unsigned> vibrate; |
| 72 bool silent; | 60 bool silent; |
| 73 WebVector<char> data; | 61 WebVector<char> data; |
| 74 }; | 62 }; |
| 75 | 63 |
| 76 } // namespace blink | 64 } // namespace blink |
| 77 | 65 |
| 78 #endif // WebNotificationData_h | 66 #endif // WebNotificationData_h |
| OLD | NEW |