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

Unified 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. Address some review comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/pushmessaging/OWNERS ('k') | Source/modules/pushmessaging/PushController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/pushmessaging/PushController.h
diff --git a/Source/modules/pushmessaging/PushController.h b/Source/modules/pushmessaging/PushController.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6063b3d0feba99dc4e3657ed7389b7a045a5120
--- /dev/null
+++ b/Source/modules/pushmessaging/PushController.h
@@ -0,0 +1,43 @@
+// Copyright 2014 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 PushController_h
+#define PushController_h
+
+#include "core/page/Page.h"
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class WebPushClient;
+
+} // namespace blink
+
+namespace WebCore {
+
+class PushController FINAL : public Supplement<Page> {
+ WTF_MAKE_NONCOPYABLE(PushController);
+
+public:
+ virtual ~PushController();
+
+ static PassOwnPtr<PushController> create(blink::WebPushClient*);
+ static const char* supplementName();
+ static PushController* from(Page* page) { return static_cast<PushController*>(Supplement<Page>::from(page, supplementName())); }
+ static blink::WebPushClient* clientFrom(Page*);
+
+ blink::WebPushClient* client() const { return m_client; }
+
+private:
+ explicit PushController(blink::WebPushClient*);
+
+ blink::WebPushClient* m_client;
+};
+
+void providePushControllerTo(Page&, blink::WebPushClient*);
+
+} // namespace WebCore
+
+#endif // PushController_h
« no previous file with comments | « Source/modules/pushmessaging/OWNERS ('k') | Source/modules/pushmessaging/PushController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698