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

Unified Diff: Source/modules/push_messaging/PushManager.cpp

Issue 687933002: Move push client to frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Address Peter's comments. 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
« no previous file with comments | « Source/modules/push_messaging/PushController.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushManager.cpp
diff --git a/Source/modules/push_messaging/PushManager.cpp b/Source/modules/push_messaging/PushManager.cpp
index c0e602eb91f738b9069da15a723702a063d5b98d..3bf7bcc1bf5eadbb6a26058654ecdb5034d2e6db 100644
--- a/Source/modules/push_messaging/PushManager.cpp
+++ b/Source/modules/push_messaging/PushManager.cpp
@@ -38,7 +38,7 @@ ScriptPromise PushManager::registerPushMessaging(ScriptState* scriptState)
ASSERT(scriptState->executionContext()->isDocument());
Document* document = toDocument(scriptState->executionContext());
- if (!document->domWindow() || !document->page())
+ if (!document->domWindow() || !document->frame())
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(AbortError, "Document is detached from window."));
WebServiceWorkerProvider* serviceWorkerProvider = NavigatorServiceWorker::serviceWorker(*document->domWindow()->navigator())->provider();
@@ -48,7 +48,7 @@ ScriptPromise PushManager::registerPushMessaging(ScriptState* scriptState)
// FIXME: Once everything except permission request goes through platform,
// delete WebPushClient and usage such as this one.
Peter Beverloo 2014/11/12 14:24:03 Is this FIXME still relevant?
Michael van Ouwerkerk 2014/11/12 14:33:01 No, but that is not really related to the current
// See crbug.com/389194
- WebPushClient* client = PushController::clientFrom(document->page());
+ WebPushClient* client = PushController::clientFrom(document->frame());
ASSERT(client);
RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
@@ -70,9 +70,9 @@ ScriptPromise PushManager::hasPermission(ScriptState* scriptState)
ASSERT(scriptState->executionContext()->isDocument());
Document* document = toDocument(scriptState->executionContext());
- if (!document->domWindow() || !document->page())
+ if (!document->domWindow() || !document->frame())
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "Document is detached from window."));
- blink::WebPushClient* client = PushController::clientFrom(document->page());
+ blink::WebPushClient* client = PushController::clientFrom(document->frame());
ASSERT(client);
// The currently implemented specification does not require a Service Worker to be present for the
« no previous file with comments | « Source/modules/push_messaging/PushController.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698