Index: content/renderer/shared_worker/websharedworker_proxy.cc |
diff --git a/content/renderer/shared_worker/websharedworker_proxy.cc b/content/renderer/shared_worker/websharedworker_proxy.cc |
index 628b14df5a38d8dc74af916a4e38f19eb6199d4c..221ba5beab3361d96a789ed54e60d966938a8384 100644 |
--- a/content/renderer/shared_worker/websharedworker_proxy.cc |
+++ b/content/renderer/shared_worker/websharedworker_proxy.cc |
@@ -60,6 +60,8 @@ bool WebSharedWorkerProxy::OnMessageReceived(const IPC::Message& message) { |
OnWorkerScriptLoadFailed) |
IPC_MESSAGE_HANDLER(ViewMsg_WorkerConnected, |
OnWorkerConnected) |
+ IPC_MESSAGE_HANDLER(ViewMsg_WorkerDestroyed, OnWorkerDestroyed) |
+ IPC_MESSAGE_HANDLER(ViewMsg_CountFeatureOnSharedWorker, OnCountFeature) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -76,9 +78,18 @@ void WebSharedWorkerProxy::OnWorkerScriptLoadFailed() { |
delete this; |
} |
-void WebSharedWorkerProxy::OnWorkerConnected() { |
+void WebSharedWorkerProxy::OnWorkerConnected(std::set<uint32_t> features) { |
listener_->connected(); |
+ for (uint32_t feature : features) |
+ listener_->countFeature(feature); |
+} |
+ |
+void WebSharedWorkerProxy::OnWorkerDestroyed() { |
delete this; |
} |
+void WebSharedWorkerProxy::OnCountFeature(uint32_t feature) { |
+ listener_->countFeature(feature); |
+} |
+ |
} // namespace content |