| 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 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 // Structure representing the data associated with a Web Notification. | 13 // Structure representing the data associated with a Web Notification. |
| 14 struct WebNotificationData { | 14 struct WebNotificationData { |
| 15 enum Direction { | 15 enum Direction { |
| 16 DirectionLeftToRight, | 16 DirectionLeftToRight, |
| 17 DirectionRightToLeft | 17 DirectionRightToLeft |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 WebNotificationData() | 20 WebNotificationData() |
| 21 : direction(DirectionLeftToRight) | 21 : direction(DirectionLeftToRight) |
| 22 , silent(false) |
| 22 { | 23 { |
| 23 } | 24 } |
| 24 | 25 |
| 26 // FIXME: Remove this constructor when Chromium has switched to the new one. |
| 25 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon) | 27 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon) |
| 26 : title(title) | 28 : title(title) |
| 27 , direction(direction) | 29 , direction(direction) |
| 28 , lang(lang) | 30 , lang(lang) |
| 29 , body(body) | 31 , body(body) |
| 30 , tag(tag) | 32 , tag(tag) |
| 31 , icon(icon) | 33 , icon(icon) |
| 34 , silent(false) |
| 32 { | 35 { |
| 33 } | 36 } |
| 34 | 37 |
| 38 WebNotificationData(const WebString& title, Direction direction, const WebSt
ring& lang, const WebString& body, const WebString& tag, const WebURL& icon, boo
l silent) |
| 39 : title(title) |
| 40 , direction(direction) |
| 41 , lang(lang) |
| 42 , body(body) |
| 43 , tag(tag) |
| 44 , icon(icon) |
| 45 , silent(silent) |
| 46 { |
| 47 } |
| 48 |
| 35 WebString title; | 49 WebString title; |
| 36 Direction direction; | 50 Direction direction; |
| 37 WebString lang; | 51 WebString lang; |
| 38 WebString body; | 52 WebString body; |
| 39 WebString tag; | 53 WebString tag; |
| 40 WebURL icon; | 54 WebURL icon; |
| 55 bool silent; |
| 41 }; | 56 }; |
| 42 | 57 |
| 43 } // namespace blink | 58 } // namespace blink |
| 44 | 59 |
| 45 #endif // WebNotificationData_h | 60 #endif // WebNotificationData_h |
| OLD | NEW |