Index: content/browser/shared_worker/shared_worker_host.cc |
diff --git a/content/browser/shared_worker/shared_worker_host.cc b/content/browser/shared_worker/shared_worker_host.cc |
index a41e5b623355657c468ae26353c36bbf10d56413..21e223699e6dba7dda23ca2d9ab32b2957729a6e 100644 |
--- a/content/browser/shared_worker/shared_worker_host.cc |
+++ b/content/browser/shared_worker/shared_worker_host.cc |
@@ -130,6 +130,15 @@ void SharedWorkerHost::RenderFrameDetached(int render_process_id, |
} |
} |
+void SharedWorkerHost::CountFeature(uint32_t feature) { |
+ if (!used_features_.insert(feature).second) |
+ return; |
+ for (const auto& filter_info : filters_) { |
+ filter_info.filter()->Send(new ViewMsg_CountFeatureOnSharedWorker( |
+ filter_info.route_id(), feature)); |
+ } |
+} |
+ |
void SharedWorkerHost::WorkerContextClosed() { |
// Set the closed flag - this will stop any further messages from |
// being sent to the worker (messages can still be sent from the worker, |
@@ -139,6 +148,13 @@ void SharedWorkerHost::WorkerContextClosed() { |
NotifyWorkerDestroyed(worker_process_id_, worker_route_id_); |
} |
+void SharedWorkerHost::WorkerContextDestroyed() { |
+ for (const auto& filter_info : filters_) { |
+ filter_info.filter()->Send( |
+ new ViewMsg_WorkerDestroyed(filter_info.route_id())); |
+ } |
+} |
+ |
void SharedWorkerHost::WorkerReadyForInspection() { |
NotifyWorkerReadyForInspection(worker_process_id_, worker_route_id_); |
} |
@@ -159,7 +175,8 @@ void SharedWorkerHost::WorkerConnected(int message_port_id) { |
for (const FilterInfo& info : filters_) { |
if (info.message_port_id() != message_port_id) |
continue; |
- info.filter()->Send(new ViewMsg_WorkerConnected(info.route_id())); |
+ info.filter()->Send( |
+ new ViewMsg_WorkerConnected(info.route_id(), used_features_)); |
return; |
} |
} |