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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return IsStarted(); | 120 return IsStarted(); |
121 } | 121 } |
122 | 122 |
123 void WebSharedWorkerProxy::startWorkerContext( | 123 void WebSharedWorkerProxy::startWorkerContext( |
124 const WebKit::WebURL& script_url, | 124 const WebKit::WebURL& script_url, |
125 const WebKit::WebString& name, | 125 const WebKit::WebString& name, |
126 const WebKit::WebString& user_agent, | 126 const WebKit::WebString& user_agent, |
127 const WebKit::WebString& source_code, | 127 const WebKit::WebString& source_code, |
128 const WebKit::WebString& content_security_policy, | 128 const WebKit::WebString& content_security_policy, |
129 WebKit::WebContentSecurityPolicyType policy_type, | 129 WebKit::WebContentSecurityPolicyType policy_type, |
130 long long script_resource_appcache_id) { | 130 long long script_resource_appcache_id, |
| 131 bool is_controller) { |
131 DCHECK(!isStarted()); | 132 DCHECK(!isStarted()); |
| 133 DCHECK(!is_controller); // renderers can't create controllers directly |
132 CreateWorkerContext( | 134 CreateWorkerContext( |
133 script_url, true, name, user_agent, source_code, content_security_policy, | 135 script_url, true, name, user_agent, source_code, content_security_policy, |
134 policy_type, pending_route_id_, script_resource_appcache_id); | 136 policy_type, pending_route_id_, script_resource_appcache_id); |
135 } | 137 } |
136 | 138 |
137 void WebSharedWorkerProxy::terminateWorkerContext() { | 139 void WebSharedWorkerProxy::terminateWorkerContext() { |
138 // This API should only be invoked from worker context. | 140 // This API should only be invoked from worker context. |
139 NOTREACHED(); | 141 NOTREACHED(); |
140 } | 142 } |
141 | 143 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // any other queued messages | 179 // any other queued messages |
178 SendQueuedMessages(); | 180 SendQueuedMessages(); |
179 | 181 |
180 // Inform any listener that the pending connect event has been sent | 182 // Inform any listener that the pending connect event has been sent |
181 // (this can result in this object being freed). | 183 // (this can result in this object being freed). |
182 if (connect_listener_) { | 184 if (connect_listener_) { |
183 connect_listener_->connected(); | 185 connect_listener_->connected(); |
184 } | 186 } |
185 } | 187 } |
186 | 188 |
| 189 void WebSharedWorkerProxy::dispatchFetchEvent(int request_id, |
| 190 WebKit::WebController::Request* re
quest) { NOTREACHED(); } |
| 191 |
187 } // namespace content | 192 } // namespace content |
OLD | NEW |