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..acef5e6cab7a20873024fbf0ce6b9aba040d069d 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,19 @@ void WebSharedWorkerProxy::OnWorkerScriptLoadFailed() { |
delete this; |
} |
-void WebSharedWorkerProxy::OnWorkerConnected() { |
+void WebSharedWorkerProxy::OnWorkerConnected( |
+ const std::set<uint32_t>& use_counter) { |
listener_->connected(); |
+ for (uint32_t use_counter_id : use_counter) |
+ listener_->countFeature(use_counter_id); |
+} |
+ |
+void WebSharedWorkerProxy::OnWorkerDestroyed() { |
delete this; |
} |
+void WebSharedWorkerProxy::OnCountFeature(uint32_t use_counter_id) { |
+ listener_->countFeature(use_counter_id); |
+} |
+ |
} // namespace content |