OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef Notification_h | 31 #ifndef Notification_h |
32 #define Notification_h | 32 #define Notification_h |
33 | 33 |
34 #include "bindings/core/v8/ScriptPromise.h" | 34 #include "bindings/core/v8/ScriptPromise.h" |
35 #include "bindings/core/v8/ScriptValue.h" | 35 #include "bindings/core/v8/ScriptValue.h" |
36 #include "bindings/core/v8/SerializedScriptValue.h" | 36 #include "bindings/core/v8/SerializedScriptValue.h" |
37 #include "core/dom/ActiveDOMObject.h" | 37 #include "core/dom/ActiveDOMObject.h" |
| 38 #include "core/dom/DOMTimeStamp.h" |
38 #include "modules/EventTargetModules.h" | 39 #include "modules/EventTargetModules.h" |
39 #include "modules/ModulesExport.h" | 40 #include "modules/ModulesExport.h" |
40 #include "modules/vibration/NavigatorVibration.h" | 41 #include "modules/vibration/NavigatorVibration.h" |
41 #include "platform/AsyncMethodRunner.h" | 42 #include "platform/AsyncMethodRunner.h" |
42 #include "platform/heap/Handle.h" | 43 #include "platform/heap/Handle.h" |
43 #include "platform/weborigin/KURL.h" | 44 #include "platform/weborigin/KURL.h" |
44 #include "public/platform/WebVector.h" | 45 #include "public/platform/WebVector.h" |
45 #include "public/platform/modules/notifications/WebNotificationData.h" | 46 #include "public/platform/modules/notifications/WebNotificationData.h" |
46 #include "public/platform/modules/notifications/WebNotificationDelegate.h" | 47 #include "public/platform/modules/notifications/WebNotificationDelegate.h" |
47 #include "public/platform/modules/notifications/WebNotificationPermission.h" | 48 #include "public/platform/modules/notifications/WebNotificationPermission.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void dispatchErrorEvent() override; | 84 void dispatchErrorEvent() override; |
84 void dispatchCloseEvent() override; | 85 void dispatchCloseEvent() override; |
85 | 86 |
86 String title() const; | 87 String title() const; |
87 String dir() const; | 88 String dir() const; |
88 String lang() const; | 89 String lang() const; |
89 String body() const; | 90 String body() const; |
90 String tag() const; | 91 String tag() const; |
91 String icon() const; | 92 String icon() const; |
92 NavigatorVibration::VibrationPattern vibrate(bool& isNull) const; | 93 NavigatorVibration::VibrationPattern vibrate(bool& isNull) const; |
| 94 DOMTimeStamp timestamp() const; |
93 bool silent() const; | 95 bool silent() const; |
94 bool requireInteraction() const; | 96 bool requireInteraction() const; |
95 ScriptValue data(ScriptState*); | 97 ScriptValue data(ScriptState*); |
96 HeapVector<NotificationAction> actions() const; | 98 HeapVector<NotificationAction> actions() const; |
97 | 99 |
98 static String permissionString(WebNotificationPermission); | 100 static String permissionString(WebNotificationPermission); |
99 static String permission(ExecutionContext*); | 101 static String permission(ExecutionContext*); |
100 static WebNotificationPermission checkPermission(ExecutionContext*); | 102 static WebNotificationPermission checkPermission(ExecutionContext*); |
101 static ScriptPromise requestPermission(ScriptState*, NotificationPermissionC
allback*); | 103 static ScriptPromise requestPermission(ScriptState*, NotificationPermissionC
allback*); |
102 | 104 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 void setState(NotificationState state) { m_state = state; } | 154 void setState(NotificationState state) { m_state = state; } |
153 | 155 |
154 NotificationState m_state; | 156 NotificationState m_state; |
155 | 157 |
156 Member<AsyncMethodRunner<Notification>> m_asyncRunner; | 158 Member<AsyncMethodRunner<Notification>> m_asyncRunner; |
157 }; | 159 }; |
158 | 160 |
159 } // namespace blink | 161 } // namespace blink |
160 | 162 |
161 #endif // Notification_h | 163 #endif // Notification_h |
OLD | NEW |