| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/shared_worker/shared_worker_host.h" | 5 #include "content/browser/shared_worker/shared_worker_host.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "content/browser/devtools/shared_worker_devtools_manager.h" | 8 #include "content/browser/devtools/shared_worker_devtools_manager.h" |
| 9 #include "content/browser/shared_worker/shared_worker_instance.h" | 9 #include "content/browser/shared_worker/shared_worker_instance.h" |
| 10 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 10 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void SharedWorkerHost::Start(bool pause_on_start) { | 76 void SharedWorkerHost::Start(bool pause_on_start) { |
| 77 WorkerProcessMsg_CreateWorker_Params params; | 77 WorkerProcessMsg_CreateWorker_Params params; |
| 78 params.url = instance_->url(); | 78 params.url = instance_->url(); |
| 79 params.name = instance_->name(); | 79 params.name = instance_->name(); |
| 80 params.content_security_policy = instance_->content_security_policy(); | 80 params.content_security_policy = instance_->content_security_policy(); |
| 81 params.security_policy_type = instance_->security_policy_type(); | 81 params.security_policy_type = instance_->security_policy_type(); |
| 82 params.creation_address_space = instance_->creation_address_space(); | 82 params.creation_address_space = instance_->creation_address_space(); |
| 83 params.pause_on_start = pause_on_start; | 83 params.pause_on_start = pause_on_start; |
| 84 params.route_id = worker_route_id_; | 84 params.route_id = worker_route_id_; |
| 85 params.data_saver_enabled = instance_->data_saver_enabled(); |
| 85 Send(new WorkerProcessMsg_CreateWorker(params)); | 86 Send(new WorkerProcessMsg_CreateWorker(params)); |
| 86 | 87 |
| 87 for (const FilterInfo& info : filters_) | 88 for (const FilterInfo& info : filters_) |
| 88 info.filter()->Send(new ViewMsg_WorkerCreated(info.route_id())); | 89 info.filter()->Send(new ViewMsg_WorkerCreated(info.route_id())); |
| 89 } | 90 } |
| 90 | 91 |
| 91 bool SharedWorkerHost::SendConnectToWorker(int worker_route_id, | 92 bool SharedWorkerHost::SendConnectToWorker(int worker_route_id, |
| 92 const MessagePort& port, | 93 const MessagePort& port, |
| 93 SharedWorkerMessageFilter* filter) { | 94 SharedWorkerMessageFilter* filter) { |
| 94 if (!IsAvailable() || !HasFilter(filter, worker_route_id)) | 95 if (!IsAvailable() || !HasFilter(filter, worker_route_id)) |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 return; | 274 return; |
| 274 } | 275 } |
| 275 } | 276 } |
| 276 } | 277 } |
| 277 | 278 |
| 278 bool SharedWorkerHost::Send(IPC::Message* message) { | 279 bool SharedWorkerHost::Send(IPC::Message* message) { |
| 279 return worker_render_filter_->Send(message); | 280 return worker_render_filter_->Send(message); |
| 280 } | 281 } |
| 281 | 282 |
| 282 } // namespace content | 283 } // namespace content |
| OLD | NEW |