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

Side by Side Diff: Source/modules/pushmessaging/PushController.h

Issue 152763002: DO NOT REVIEW Bindings and plumbing for push messaging API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Flip flag to experimental. Created 6 years, 9 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 PushController_h
6 #define PushController_h
7
8 #include "core/page/Page.h"
9 #include "wtf/Forward.h"
10 #include "wtf/Noncopyable.h"
11
12 namespace blink {
13
14 class WebPushClient;
15
16 } // namespace blink
17
18 namespace WebCore {
19
20 class PushController FINAL : public Supplement<Page> {
21 WTF_MAKE_NONCOPYABLE(PushController);
22
23 public:
24 virtual ~PushController();
25
26 static PassOwnPtr<PushController> create(blink::WebPushClient*);
27 static const char* supplementName();
28 static PushController* from(Page* page) { return static_cast<PushController* >(Supplement<Page>::from(page, supplementName())); }
29 static blink::WebPushClient* clientFrom(Page*);
30
31 blink::WebPushClient* client() { return m_client; }
Peter Beverloo 2014/03/10 13:59:28 nit: can be const
Michael van Ouwerkerk 2014/03/10 15:12:04 Done.
32
33 private:
34 explicit PushController(blink::WebPushClient*);
35
36 blink::WebPushClient* m_client;
37 };
38
39 void providePushControllerTo(Page&, blink::WebPushClient*);
40
41 } // namespace WebCore
42
43 #endif // PushController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698