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

Unified Diff: Source/modules/push_messaging/PushController.h

Issue 687933002: Move push client to frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 1 month 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
Index: Source/modules/push_messaging/PushController.h
diff --git a/Source/modules/push_messaging/PushController.h b/Source/modules/push_messaging/PushController.h
index 26d1e9aa5dbe28614909608a4cf7f3c137f9f8cc..568d12d3c0fc642a2aaa6a058a626c60365fc5a8 100644
--- a/Source/modules/push_messaging/PushController.h
+++ b/Source/modules/push_messaging/PushController.h
@@ -5,7 +5,7 @@
#ifndef PushController_h
#define PushController_h
-#include "core/page/Page.h"
+#include "core/frame/LocalFrame.h"
#include "platform/Supplementable.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
@@ -15,19 +15,17 @@ namespace blink {
class WebPushClient;
-class PushController final : public NoBaseWillBeGarbageCollected<PushController>, public WillBeHeapSupplement<Page> {
+class PushController final : public NoBaseWillBeGarbageCollected<PushController>, public WillBeHeapSupplement<LocalFrame> {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PushController);
WTF_MAKE_NONCOPYABLE(PushController);
public:
static PassOwnPtrWillBeRawPtr<PushController> create(WebPushClient*);
static const char* supplementName();
- static PushController* from(Page* page) { return static_cast<PushController*>(WillBeHeapSupplement<Page>::from(page, supplementName())); }
- static WebPushClient* clientFrom(Page*);
+ static PushController* from(LocalFrame* frame) { return static_cast<PushController*>(WillBeHeapSupplement<LocalFrame>::from(frame, supplementName())); }
+ static WebPushClient* clientFrom(LocalFrame*);
- WebPushClient* client() const { return m_client; }
-
- virtual void trace(Visitor* visitor) override { WillBeHeapSupplement<Page>::trace(visitor); }
+ virtual void trace(Visitor* visitor) override { WillBeHeapSupplement<LocalFrame>::trace(visitor); }
private:
explicit PushController(WebPushClient*);
@@ -35,7 +33,7 @@ private:
WebPushClient* m_client;
};
-void providePushControllerTo(Page&, WebPushClient*);
+void providePushControllerTo(LocalFrame&, WebPushClient*);
} // namespace blink
« no previous file with comments | « no previous file | Source/modules/push_messaging/PushController.cpp » ('j') | Source/modules/push_messaging/PushController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698