Chromium Code Reviews| Index: Source/modules/notifications/PageNotificationEvent.h |
| diff --git a/Source/modules/notifications/PageNotificationEvent.h b/Source/modules/notifications/PageNotificationEvent.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..613591bb284a344e75f43bebc295dc31545c4e8b |
| --- /dev/null |
| +++ b/Source/modules/notifications/PageNotificationEvent.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PageNotificationEvent_h |
| +#define PageNotificationEvent_h |
| + |
| +#include "modules/EventModules.h" |
| +#include "modules/ModulesExport.h" |
| +#include "modules/notifications/PageNotificationEventInit.h" |
| +#include "platform/heap/Handle.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace blink { |
| + |
| +class MODULES_EXPORT PageNotificationEvent final : public Event { |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + static PassRefPtrWillBeRawPtr<PageNotificationEvent> create() |
| + { |
| + return adoptRefWillBeNoop(new PageNotificationEvent); |
| + } |
| + static PassRefPtrWillBeRawPtr<PageNotificationEvent> create(const AtomicString& type, const PageNotificationEventInit& initializer) |
| + { |
| + return adoptRefWillBeNoop(new PageNotificationEvent(type, initializer)); |
| + } |
| + |
| + String action() const { return m_action; } |
| + |
| + const AtomicString& interfaceName() const override { return EventNames::PageNotificationEvent; } |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } |
| + |
| +private: |
| + PageNotificationEvent() { } |
| + |
| + PageNotificationEvent(const AtomicString& type, const PageNotificationEventInit& initializer) |
| + : Event(type, initializer) |
| + { |
| + if (initializer.hasAction()) |
|
Peter Beverloo
2015/08/07 07:25:25
--> .cpp
|
| + m_action = initializer.action(); |
| + } |
| + |
| + String m_action; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // PageNotificationEvent_h |