| 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..936e5fde14acdb2ad7acbc31d4bd4423f7b57aa8 100644
|
| --- a/content/browser/shared_worker/shared_worker_host.cc
|
| +++ b/content/browser/shared_worker/shared_worker_host.cc
|
| @@ -130,6 +130,16 @@ void SharedWorkerHost::RenderFrameDetached(int render_process_id,
|
| }
|
| }
|
|
|
| +void SharedWorkerHost::CountFeature(uint32_t feature) {
|
| + if (use_counter_.IsCounted(feature))
|
| + return;
|
| + use_counter_.Count(feature);
|
| + 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 +149,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 +176,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(), use_counter_.Dump()));
|
| return;
|
| }
|
| }
|
|
|