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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushController.cpp

Issue 2614143002: Use a new Supplement constructor for LocalFrame's supplements (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/modules/push_messaging/PushController.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushController.cpp b/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
index 5fb8c8ead3bc060375e8a6c9c1cb8ff49e0cce36..539f485e106ac6b2569d7c15b518c2784c6cf3df 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
@@ -9,11 +9,8 @@
namespace blink {
-PushController::PushController(WebPushClient* client) : m_client(client) {}
-
-PushController* PushController::create(WebPushClient* client) {
- return new PushController(client);
-}
+PushController::PushController(LocalFrame& frame, WebPushClient* client)
+ : Supplement<LocalFrame>(frame), m_client(client) {}
WebPushClient& PushController::clientFrom(LocalFrame* frame) {
PushController* controller = PushController::from(frame);
@@ -29,7 +26,7 @@ const char* PushController::supplementName() {
void providePushControllerTo(LocalFrame& frame, WebPushClient* client) {
PushController::provideTo(frame, PushController::supplementName(),
- PushController::create(client));
+ new PushController(frame, client));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698