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

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

Issue 541943003: ServiceWorker: Remove navigator.serviceWorker.{installing,waiting,active} (Blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 2a6352767a6c3b46e0efe5176a073b3160816f66..9bc1ba540f19c2d15cd838976fddccf29d51239b 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -74,10 +74,7 @@ void ServiceWorkerContainer::willBeDetachedFromFrame()
void ServiceWorkerContainer::trace(Visitor* visitor)
{
- visitor->trace(m_active);
visitor->trace(m_controller);
- visitor->trace(m_installing);
- visitor->trace(m_waiting);
visitor->trace(m_readyRegistration);
visitor->trace(m_ready);
}
@@ -200,6 +197,15 @@ static void deleteIfNoExistingOwner(WebServiceWorkerRegistration* registration)
delete registration;
}
+void ServiceWorkerContainer::setController(WebServiceWorker* serviceWorker)
tkent 2014/09/05 07:43:53 nit: please don't move unaffected code. Reviewers
+{
+ if (!executionContext()) {
+ deleteIfNoExistingOwner(serviceWorker);
+ return;
+ }
+ m_controller = ServiceWorker::from(executionContext(), serviceWorker);
+}
+
void ServiceWorkerContainer::setReadyRegistration(WebServiceWorkerRegistration* registration)
{
if (!executionContext()) {
@@ -220,42 +226,6 @@ void ServiceWorkerContainer::setReadyRegistration(WebServiceWorkerRegistration*
m_ready->resolve(readyRegistration);
}
-void ServiceWorkerContainer::setActive(WebServiceWorker* serviceWorker)
-{
- if (!executionContext()) {
- deleteIfNoExistingOwner(serviceWorker);
- return;
- }
- m_active = ServiceWorker::from(executionContext(), serviceWorker);
-}
-
-void ServiceWorkerContainer::setController(WebServiceWorker* serviceWorker)
-{
- if (!executionContext()) {
- deleteIfNoExistingOwner(serviceWorker);
- return;
- }
- m_controller = ServiceWorker::from(executionContext(), serviceWorker);
-}
-
-void ServiceWorkerContainer::setInstalling(WebServiceWorker* serviceWorker)
-{
- if (!executionContext()) {
- deleteIfNoExistingOwner(serviceWorker);
- return;
- }
- m_installing = ServiceWorker::from(executionContext(), serviceWorker);
-}
-
-void ServiceWorkerContainer::setWaiting(WebServiceWorker* serviceWorker)
-{
- if (!executionContext()) {
- deleteIfNoExistingOwner(serviceWorker);
- return;
- }
- m_waiting = ServiceWorker::from(executionContext(), serviceWorker);
-}
-
void ServiceWorkerContainer::dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray& webChannels)
{
if (!executionContext() || !executionContext()->executingWindow())
« 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