Chromium Code Reviews| Index: Source/modules/notifications/Notification.h |
| diff --git a/Source/modules/notifications/Notification.h b/Source/modules/notifications/Notification.h |
| index 1f780a0a9bfdd265eb3e0c2c89bc3e0ed2ae1cb6..96856a7646eb91d19c4a98da9f113aebcb399628 100644 |
| --- a/Source/modules/notifications/Notification.h |
| +++ b/Source/modules/notifications/Notification.h |
| @@ -52,6 +52,7 @@ class NotificationOptions; |
| class NotificationPermissionCallback; |
| class ScriptState; |
| class ScriptValue; |
| +class UnsignedLongOrUnsignedLongSequence; |
| struct WebNotificationData; |
| class Notification final : public RefCountedGarbageCollectedEventTargetWithInlineData<Notification>, public ActiveDOMObject, public WebNotificationDelegate { |
| @@ -87,6 +88,7 @@ public: |
| String body() const { return m_body; } |
| String tag() const { return m_tag; } |
| String icon() const { return m_iconUrl; } |
| + Vector<unsigned> vibrate(bool& isNull) const; |
| bool silent() const { return m_silent; } |
| ScriptValue data(ScriptState*) const; |
| @@ -98,6 +100,7 @@ public: |
| static String permission(ExecutionContext*); |
| static WebNotificationPermission checkPermission(ExecutionContext*); |
| static void requestPermission(ExecutionContext*, NotificationPermissionCallback* = nullptr); |
| + static Vector<unsigned> sanitizeVibrationPattern(const UnsignedLongOrUnsignedLongSequence&); |
|
Peter Beverloo
2015/04/09 13:03:17
I don't think this should be the responsibility of
Sanghyun Park
2015/04/09 13:48:05
If we use sanitation algorithm in Vibration API, w
Peter Beverloo
2015/04/09 13:53:07
Yes, and that's exactly the point :-). We don't ha
Sanghyun Park
2015/04/09 16:26:11
Thanks for letting me know about this, too. :)
|
| // EventTarget interface. |
| virtual ExecutionContext* executionContext() const override final { return ActiveDOMObject::executionContext(); } |
| @@ -127,6 +130,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 setVibrate(const Vector<unsigned>& vibrate) { m_vibrate = vibrate; } |
| void setSilent(bool silent) { m_silent = silent; } |
| void setSerializedData(PassRefPtr<SerializedScriptValue> data) { m_serializedData = data; } |
| @@ -138,6 +142,7 @@ private: |
| String m_lang; |
| String m_body; |
| String m_tag; |
| + Vector<unsigned> m_vibrate; |
| bool m_silent; |
| RefPtr<SerializedScriptValue> m_serializedData; |