| 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..e99453fff3898772f4661bfa1d7f14014a74b10a 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 use_counter_id) {
|
| + if (!use_counter_.insert(use_counter_id).second)
|
| + return;
|
| + for (const auto& filter_info : filters_) {
|
| + filter_info.filter()->Send(new ViewMsg_CountFeatureOnSharedWorker(
|
| + filter_info.route_id(), use_counter_id));
|
| + }
|
| +}
|
| +
|
| 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(), use_counter_));
|
| return;
|
| }
|
| }
|
|
|