| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/websharedworker_proxy.h" | 5 #include "content/renderer/websharedworker_proxy.h" |
| 6 | 6 |
| 7 #include "content/child/child_thread.h" | 7 #include "content/child/child_thread.h" |
| 8 #include "content/child/webmessageportchannel_impl.h" | 8 #include "content/child/webmessageportchannel_impl.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/common/worker_messages.h" | 10 #include "content/common/worker_messages.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const base::string16& user_agent, | 57 const base::string16& user_agent, |
| 58 const base::string16& source_code, | 58 const base::string16& source_code, |
| 59 const base::string16& content_security_policy, | 59 const base::string16& content_security_policy, |
| 60 blink::WebContentSecurityPolicyType policy_type, | 60 blink::WebContentSecurityPolicyType policy_type, |
| 61 int pending_route_id, | 61 int pending_route_id, |
| 62 int64 script_resource_appcache_id) { | 62 int64 script_resource_appcache_id) { |
| 63 DCHECK(route_id_ == MSG_ROUTING_NONE); | 63 DCHECK(route_id_ == MSG_ROUTING_NONE); |
| 64 ViewHostMsg_CreateWorker_Params params; | 64 ViewHostMsg_CreateWorker_Params params; |
| 65 params.url = script_url; | 65 params.url = script_url; |
| 66 params.name = name; | 66 params.name = name; |
| 67 params.content_security_policy = content_security_policy; |
| 68 params.security_policy_type = policy_type; |
| 67 params.document_id = document_id_; | 69 params.document_id = document_id_; |
| 68 params.render_view_route_id = render_view_route_id_; | 70 params.render_view_route_id = render_view_route_id_; |
| 69 params.render_frame_route_id = render_frame_route_id_; | 71 params.render_frame_route_id = render_frame_route_id_; |
| 70 params.route_id = pending_route_id; | 72 params.route_id = pending_route_id; |
| 71 params.script_resource_appcache_id = script_resource_appcache_id; | 73 params.script_resource_appcache_id = script_resource_appcache_id; |
| 72 IPC::Message* create_message = new ViewHostMsg_CreateWorker( | 74 IPC::Message* create_message = new ViewHostMsg_CreateWorker( |
| 73 params, &route_id_); | 75 params, &route_id_); |
| 74 child_thread_->Send(create_message); | 76 child_thread_->Send(create_message); |
| 75 if (route_id_ == MSG_ROUTING_NONE) | 77 if (route_id_ == MSG_ROUTING_NONE) |
| 76 return; | 78 return; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 SendQueuedMessages(); | 173 SendQueuedMessages(); |
| 172 | 174 |
| 173 // Inform any listener that the pending connect event has been sent | 175 // Inform any listener that the pending connect event has been sent |
| 174 // (this can result in this object being freed). | 176 // (this can result in this object being freed). |
| 175 if (connect_listener_) { | 177 if (connect_listener_) { |
| 176 connect_listener_->connected(); | 178 connect_listener_->connected(); |
| 177 } | 179 } |
| 178 } | 180 } |
| 179 | 181 |
| 180 } // namespace content | 182 } // namespace content |
| OLD | NEW |