Index: content/child/service_worker/web_service_worker_impl.cc |
diff --git a/content/child/service_worker/web_service_worker_impl.cc b/content/child/service_worker/web_service_worker_impl.cc |
index 626aa0bd31b5b376594627403f95b91e6c6fd964..74fe887571f8b04b64af7bd30de6e1d2d7d25e83 100644 |
--- a/content/child/service_worker/web_service_worker_impl.cc |
+++ b/content/child/service_worker/web_service_worker_impl.cc |
@@ -44,17 +44,14 @@ WebServiceWorkerImpl::~WebServiceWorkerImpl() { |
dispatcher->RemoveServiceWorker(handle_id_); |
} |
-void WebServiceWorkerImpl::SetState(blink::WebServiceWorkerState new_state) { |
- state_ = new_state; |
- if (!proxy_) |
- return; |
- proxy_->dispatchStateChangeEvent(); |
-} |
- |
void WebServiceWorkerImpl::setProxy(blink::WebServiceWorkerProxy* proxy) { |
proxy_ = proxy; |
} |
+void WebServiceWorkerImpl::setState(blink::WebServiceWorkerState new_state) { |
+ state_ = new_state; |
+} |
+ |
blink::WebURL WebServiceWorkerImpl::scope() const { |
return scope_; |
} |
@@ -75,4 +72,10 @@ void WebServiceWorkerImpl::postMessage(const WebString& message, |
WebMessagePortChannelImpl::ExtractMessagePortIDs(channels))); |
} |
+void WebServiceWorkerImpl::OnStateChanged( |
+ blink::WebServiceWorkerState new_state) { |
+ DCHECK(proxy_); |
+ proxy_->onStateChanged(new_state); |
+} |
+ |
} // namespace content |