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

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

Issue 285403002: Push API: define push event on Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Define PushEvent with data attribute. Created 6 years, 7 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
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 "core/events/Event.h"
9
Peter Beverloo 2014/05/16 15:41:43 IWYU please
Michael van Ouwerkerk 2014/05/21 17:06:42 Done.
10 namespace WebCore {
11
12 struct PushEventInit : public EventInit {
13 PushEventInit();
14
15 String data;
16 };
17
18 class PushEvent FINAL : public Event {
19 public:
20 static PassRefPtr<PushEvent> create()
Peter Beverloo 2014/05/16 15:41:43 PassRefPtrWillBeRawPtr (elsewhere too)
Michael van Ouwerkerk 2014/05/21 17:06:42 Done.
21 {
22 return adoptRef(new PushEvent);
Peter Beverloo 2014/05/16 15:41:43 adoptRefWillBeNoop (elsewhere too)
Michael van Ouwerkerk 2014/05/21 17:06:42 Done.
23 }
24 static PassRefPtr<PushEvent> create(const AtomicString& type, const String& data)
25 {
26 return adoptRef(new PushEvent(type, data));
27 }
28 static PassRefPtr<PushEvent> create(const AtomicString& type, const PushEven tInit& initializer)
29 {
30 return adoptRef(new PushEvent(type, initializer));
31 }
32
33 virtual ~PushEvent();
34
35 virtual const AtomicString& interfaceName() const OVERRIDE;
36
37 String data() const { return m_data; }
38
Peter Beverloo 2014/05/16 15:41:43 Hmm. Most other Event implementations override the
Michael van Ouwerkerk 2014/05/21 17:06:42 Ok.
39 private:
40 PushEvent();
41 PushEvent(const AtomicString& type, const String& data);
42 PushEvent(const AtomicString&, const PushEventInit&);
Peter Beverloo 2014/05/16 15:41:43 Please name the first argument (since AtomicString
Michael van Ouwerkerk 2014/05/21 17:06:42 Done.
43 String m_data;
44 };
45
46 } // namespace WebCore
47
48 #endif // PushEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698