Chromium Code Reviews| Index: Source/modules/notifications/Notification.h |
| diff --git a/Source/modules/notifications/Notification.h b/Source/modules/notifications/Notification.h |
| index 31735bfc09638301e01ed1731ef34223e6263b7f..2ada9429b19a25d506e4a7f53a38100395139dc9 100644 |
| --- a/Source/modules/notifications/Notification.h |
| +++ b/Source/modules/notifications/Notification.h |
| @@ -44,6 +44,7 @@ |
| #include "platform/weborigin/KURL.h" |
| #include "public/platform/WebVector.h" |
| #include "public/platform/modules/notifications/WebNotificationAction.h" |
| +#include "public/platform/modules/notifications/WebNotificationData.h" |
| #include "public/platform/modules/notifications/WebNotificationDelegate.h" |
| #include "public/platform/modules/notifications/WebNotificationPermission.h" |
| #include "wtf/PassOwnPtr.h" |
| @@ -93,6 +94,7 @@ public: |
| String lang() const { return m_lang; } |
| String body() const { return m_body; } |
| String tag() const { return m_tag; } |
| + String priority() const { return m_priority; } |
| String icon() const { return m_iconUrl; } |
| const NavigatorVibration::VibrationPattern& vibrate(bool& isNull) const; |
| bool silent() const { return m_silent; } |
| @@ -108,6 +110,8 @@ public: |
| static WebNotificationPermission checkPermission(ExecutionContext*); |
| static ScriptPromise requestPermission(ScriptState*, NotificationPermissionCallback*); |
| + static WebNotificationData::Priority priorityEnum(const String& priority); |
| + |
| static size_t maxActions(); |
| static void actionsToWebActions(const HeapVector<NotificationAction>& actions, WebVector<WebNotificationAction>* webActions); |
| @@ -127,6 +131,8 @@ protected: |
| bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) final; |
| private: |
| + static String priorityString(WebNotificationData::Priority); |
| + |
| static void webActionsToActions(const WebVector<WebNotificationAction>& webActions, HeapVector<NotificationAction>* actions); |
| Notification(const String& title, ExecutionContext*); |
| @@ -145,6 +151,7 @@ private: |
| void setBody(const String& body) { m_body = body; } |
| void setIconUrl(KURL iconUrl) { m_iconUrl = iconUrl; } |
| void setTag(const String& tag) { m_tag = tag; } |
| + void setPriority(const String& priority) { m_priority = priority; } |
| void setVibrate(const NavigatorVibration::VibrationPattern& vibrate) { m_vibrate = vibrate; } |
| void setSilent(bool silent) { m_silent = silent; } |
| void setSerializedData(PassRefPtr<SerializedScriptValue> data) { m_serializedData = data; } |
| @@ -157,6 +164,7 @@ private: |
| String m_lang; |
| String m_body; |
| String m_tag; |
| + String m_priority; |
|
Peter Beverloo
2015/08/03 16:41:59
I don't like having enum values stored as strings.
johnme
2015/08/03 16:58:48
Acknowledged.
|
| NavigatorVibration::VibrationPattern m_vibrate; |
| bool m_silent; |
| RefPtr<SerializedScriptValue> m_serializedData; |