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

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

Issue 301103003: Rename navigator.serviceWorker.current to controller. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring rebaselines to head. Created 6 years, 7 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/ServiceWorkerContainer.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index 8f64cd454ce526e251be8f3e408e567ba0e27fc9..cd0c219d9ce70fb16a6d7dd1d9c442c263cf7566 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -142,11 +142,16 @@ ScriptPromise ServiceWorkerContainer::unregisterServiceWorker(ExecutionContext*
void ServiceWorkerContainer::setCurrentServiceWorker(blink::WebServiceWorker* serviceWorker)
{
+ setController(serviceWorker);
+}
+
+void ServiceWorkerContainer::setController(blink::WebServiceWorker* serviceWorker)
+{
if (!executionContext()) {
delete serviceWorker;
return;
}
- m_current = ServiceWorker::create(executionContext(), adoptPtr(serviceWorker));
+ m_controller = ServiceWorker::create(executionContext(), adoptPtr(serviceWorker));
}
void ServiceWorkerContainer::dispatchMessageEvent(const blink::WebString& message, const blink::WebMessagePortChannelArray& webChannels)
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainer.h ('k') | Source/modules/serviceworkers/ServiceWorkerContainer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698