Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: Source/modules/push_messaging/PushEvent.h

Issue 318413002: Push API: define push event on Service Worker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/push_messaging/PushEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PushEvent_h
6 #define PushEvent_h
7
8 #include "modules/EventModules.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/text/AtomicString.h"
11 #include "wtf/text/WTFString.h"
12
13 namespace WebCore {
14
15 struct PushEventInit : public EventInit {
16 PushEventInit();
17
18 String data;
19 };
20
21 class PushEvent FINAL : public Event {
22 public:
23 static PassRefPtrWillBeRawPtr<PushEvent> create()
24 {
25 return adoptRefWillBeNoop(new PushEvent);
26 }
27 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, co nst String& data)
28 {
29 return adoptRefWillBeNoop(new PushEvent(type, data));
30 }
31 static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, co nst PushEventInit& initializer)
32 {
33 return adoptRefWillBeNoop(new PushEvent(type, initializer));
34 }
35
36 virtual ~PushEvent();
37
38 virtual const AtomicString& interfaceName() const OVERRIDE;
39
40 String data() const { return m_data; }
41
42 private:
43 PushEvent();
44 PushEvent(const AtomicString& type, const String& data);
45 PushEvent(const AtomicString& type, const PushEventInit&);
46 String m_data;
47 };
48
49 } // namespace WebCore
50
51 #endif // PushEvent_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/push_messaging/PushEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698