Chromium Code Reviews| Index: Source/modules/notifications/Notification.h |
| diff --git a/Source/modules/notifications/Notification.h b/Source/modules/notifications/Notification.h |
| index 4074afbeba9fe6eeb0739c61ab33505b0d1f502c..1e2cc856a2106e74320d656798d82e252f3f2b30 100644 |
| --- a/Source/modules/notifications/Notification.h |
| +++ b/Source/modules/notifications/Notification.h |
| @@ -31,6 +31,7 @@ |
| #ifndef Notification_h |
| #define Notification_h |
| +#include "bindings/core/v8/SerializedScriptValue.h" |
| #include "core/dom/ActiveDOMObject.h" |
| #include "modules/EventTargetModules.h" |
| #include "platform/AsyncMethodRunner.h" |
| @@ -40,13 +41,17 @@ |
| #include "public/platform/modules/notifications/WebNotificationDelegate.h" |
| #include "public/platform/modules/notifications/WebNotificationPermission.h" |
| #include "wtf/PassOwnPtr.h" |
| +#include "wtf/PassRefPtr.h" |
| #include "wtf/RefCounted.h" |
| +#include "wtf/RefPtr.h" |
| namespace blink { |
| class ExecutionContext; |
| class NotificationOptions; |
| class NotificationPermissionCallback; |
| +class ScriptState; |
| +class ScriptValue; |
| struct WebNotificationData; |
| class Notification final : public RefCountedGarbageCollectedEventTargetWithInlineData<Notification>, public ActiveDOMObject, public WebNotificationDelegate { |
| @@ -83,6 +88,8 @@ public: |
| String tag() const { return m_tag; } |
| String icon() const { return m_iconUrl; } |
| bool silent() const { return m_silent; } |
| + ScriptValue data(ScriptState*); |
| + SerializedScriptValue* serializedData() const { return m_serializedData.get(); } |
|
Peter Beverloo
2015/03/13 12:12:07
nit: I'd prefer to have serializedData() separate
Sanghyun Park
2015/03/13 17:47:31
I'll move this line to under "KURL iconURL() const
|
| TextDirection direction() const; |
| KURL iconURL() const { return m_iconUrl; } |
| @@ -121,6 +128,7 @@ private: |
| void setIconUrl(KURL iconUrl) { m_iconUrl = iconUrl; } |
| void setTag(const String& tag) { m_tag = tag; } |
| void setSilent(bool silent) { m_silent = silent; } |
| + void setSerializedData(PassRefPtr<SerializedScriptValue> data) { m_serializedData = data; } |
| void setPersistentId(const String& persistentId) { m_persistentId = persistentId; } |
| @@ -131,6 +139,7 @@ private: |
| String m_body; |
| String m_tag; |
| bool m_silent; |
| + RefPtr<SerializedScriptValue> m_serializedData; |
| KURL m_iconUrl; |