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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // come after nobody is listening. Since Worker and WorkerContext can | 44 // come after nobody is listening. Since Worker and WorkerContext can |
45 // terminate independently, already sent messages may still be in the pipe. | 45 // terminate independently, already sent messages may still be in the pipe. |
46 child_thread_->RemoveRoute(route_id_); | 46 child_thread_->RemoveRoute(route_id_); |
47 | 47 |
48 route_id_ = MSG_ROUTING_NONE; | 48 route_id_ = MSG_ROUTING_NONE; |
49 } | 49 } |
50 | 50 |
51 void WebSharedWorkerProxy::CreateWorkerContext( | 51 void WebSharedWorkerProxy::CreateWorkerContext( |
52 const GURL& script_url, | 52 const GURL& script_url, |
53 bool is_shared, | 53 bool is_shared, |
54 const string16& name, | 54 const base::string16& name, |
55 const string16& user_agent, | 55 const base::string16& user_agent, |
56 const string16& source_code, | 56 const base::string16& source_code, |
57 const 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.document_id = document_id_; | 65 params.document_id = document_id_; |
66 params.render_view_route_id = render_view_route_id_; | 66 params.render_view_route_id = render_view_route_id_; |
67 params.route_id = pending_route_id; | 67 params.route_id = pending_route_id; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 SendQueuedMessages(); | 178 SendQueuedMessages(); |
179 | 179 |
180 // Inform any listener that the pending connect event has been sent | 180 // Inform any listener that the pending connect event has been sent |
181 // (this can result in this object being freed). | 181 // (this can result in this object being freed). |
182 if (connect_listener_) { | 182 if (connect_listener_) { |
183 connect_listener_->connected(); | 183 connect_listener_->connected(); |
184 } | 184 } |
185 } | 185 } |
186 | 186 |
187 } // namespace content | 187 } // namespace content |
OLD | NEW |