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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp

Issue 901663005: Revert r189385 "Remove LifecycleContext" and r189391, r189530, r189456 that block it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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: Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
index 7c6fa9c75a7859e150d481f982d4b4957a4c9ef1..ef68824cde4d0336ef13de2b4283b7add179863d 100644
--- a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
@@ -76,11 +76,11 @@ ScriptPromise ServiceWorkerWindowClient::focus(ScriptState* scriptState)
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
- if (!scriptState->executionContext()->isWindowInteractionAllowed()) {
+ if (!scriptState->executionContext()->isWindowFocusAllowed()) {
resolver->reject(DOMException::create(InvalidAccessError, "Not allowed to focus a window."));
return promise;
}
- scriptState->executionContext()->consumeWindowInteraction();
+ scriptState->executionContext()->consumeWindowFocus();
ServiceWorkerGlobalScopeClient::from(scriptState->executionContext())->focus(id(), new CallbackPromiseAdapter<ServiceWorkerWindowClient, ServiceWorkerError>(resolver));
return promise;
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.h ('k') | Source/modules/serviceworkers/WaitUntilObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698