| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 const base::string16& user_agent, | 55 const base::string16& user_agent, |
| 56 const base::string16& source_code, | 56 const base::string16& source_code, |
| 57 const base::string16& content_security_policy, | 57 const base::string16& content_security_policy, |
| 58 blink::WebContentSecurityPolicyType policy_type, | 58 blink::WebContentSecurityPolicyType policy_type, |
| 59 int pending_route_id, | 59 int pending_route_id, |
| 60 int64 script_resource_appcache_id) { | 60 int64 script_resource_appcache_id) { |
| 61 DCHECK(route_id_ == MSG_ROUTING_NONE); | 61 DCHECK(route_id_ == MSG_ROUTING_NONE); |
| 62 ViewHostMsg_CreateWorker_Params params; | 62 ViewHostMsg_CreateWorker_Params params; |
| 63 params.url = script_url; | 63 params.url = script_url; |
| 64 params.name = name; | 64 params.name = name; |
| 65 params.content_security_policy = content_security_policy; |
| 66 params.security_policy_type = policy_type; |
| 65 params.document_id = document_id_; | 67 params.document_id = document_id_; |
| 66 params.render_view_route_id = render_view_route_id_; | 68 params.render_view_route_id = render_view_route_id_; |
| 67 params.route_id = pending_route_id; | 69 params.route_id = pending_route_id; |
| 68 params.script_resource_appcache_id = script_resource_appcache_id; | 70 params.script_resource_appcache_id = script_resource_appcache_id; |
| 69 IPC::Message* create_message = new ViewHostMsg_CreateWorker( | 71 IPC::Message* create_message = new ViewHostMsg_CreateWorker( |
| 70 params, &route_id_); | 72 params, &route_id_); |
| 71 child_thread_->Send(create_message); | 73 child_thread_->Send(create_message); |
| 72 if (route_id_ == MSG_ROUTING_NONE) | 74 if (route_id_ == MSG_ROUTING_NONE) |
| 73 return; | 75 return; |
| 74 | 76 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 SendQueuedMessages(); | 170 SendQueuedMessages(); |
| 169 | 171 |
| 170 // Inform any listener that the pending connect event has been sent | 172 // Inform any listener that the pending connect event has been sent |
| 171 // (this can result in this object being freed). | 173 // (this can result in this object being freed). |
| 172 if (connect_listener_) { | 174 if (connect_listener_) { |
| 173 connect_listener_->connected(); | 175 connect_listener_->connected(); |
| 174 } | 176 } |
| 175 } | 177 } |
| 176 | 178 |
| 177 } // namespace content | 179 } // namespace content |
| OLD | NEW |