OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/common/webmessageportchannel_impl.h" | 8 #include "content/common/webmessageportchannel_impl.h" |
9 #include "content/common/worker_messages.h" | 9 #include "content/common/worker_messages.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
11 | 11 |
12 WebSharedWorkerProxy::WebSharedWorkerProxy(ChildThread* child_thread, | 12 WebSharedWorkerProxy::WebSharedWorkerProxy(ChildThread* child_thread, |
13 unsigned long long document_id, | 13 unsigned long long document_id, |
14 bool exists, | 14 bool exists, |
15 int route_id, | 15 int route_id, |
16 int render_view_route_id) | 16 int render_view_route_id) |
17 : WebWorkerBase(child_thread, | 17 : WebWorkerBase(child_thread, |
18 document_id, | 18 document_id, |
19 exists ? route_id : MSG_ROUTING_NONE, | 19 exists ? route_id : MSG_ROUTING_NONE, |
20 render_view_route_id, | 20 render_view_route_id, |
21 0), | 21 0, |
| 22 NULL), |
22 pending_route_id_(route_id), | 23 pending_route_id_(route_id), |
23 connect_listener_(NULL) { | 24 connect_listener_(NULL) { |
24 } | 25 } |
25 | 26 |
26 bool WebSharedWorkerProxy::isStarted() { | 27 bool WebSharedWorkerProxy::isStarted() { |
27 return IsStarted(); | 28 return IsStarted(); |
28 } | 29 } |
29 | 30 |
30 void WebSharedWorkerProxy::startWorkerContext( | 31 void WebSharedWorkerProxy::startWorkerContext( |
31 const WebKit::WebURL& script_url, | 32 const WebKit::WebURL& script_url, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // The worker is created - now send off the CreateWorkerContext message and | 81 // The worker is created - now send off the CreateWorkerContext message and |
81 // any other queued messages | 82 // any other queued messages |
82 SendQueuedMessages(); | 83 SendQueuedMessages(); |
83 | 84 |
84 // Inform any listener that the pending connect event has been sent | 85 // Inform any listener that the pending connect event has been sent |
85 // (this can result in this object being freed). | 86 // (this can result in this object being freed). |
86 if (connect_listener_) { | 87 if (connect_listener_) { |
87 connect_listener_->connected(); | 88 connect_listener_->connected(); |
88 } | 89 } |
89 } | 90 } |
OLD | NEW |