OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/shared_worker/shared_worker_host.h" | 5 #include "content/browser/shared_worker/shared_worker_host.h" |
6 | 6 |
7 #include "content/browser/frame_host/render_frame_host_delegate.h" | 7 #include "content/browser/frame_host/render_frame_host_delegate.h" |
8 #include "content/browser/frame_host/render_frame_host_impl.h" | 8 #include "content/browser/frame_host/render_frame_host_impl.h" |
9 #include "content/browser/message_port_service.h" | 9 #include "content/browser/message_port_service.h" |
10 #include "content/browser/shared_worker/shared_worker_instance.h" | 10 #include "content/browser/shared_worker/shared_worker_instance.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 void SharedWorkerHost::WorkerContextDestroyed() { | 130 void SharedWorkerHost::WorkerContextDestroyed() { |
131 if (!instance_) | 131 if (!instance_) |
132 return; | 132 return; |
133 instance_.reset(); | 133 instance_.reset(); |
134 } | 134 } |
135 | 135 |
136 void SharedWorkerHost::WorkerScriptLoaded() { | 136 void SharedWorkerHost::WorkerScriptLoaded() { |
137 // TODO(horo): implement this. | 137 // TODO(horo): implement this. |
138 NOTIMPLEMENTED(); | |
139 } | 138 } |
140 | 139 |
141 void SharedWorkerHost::WorkerScriptLoadFailed() { | 140 void SharedWorkerHost::WorkerScriptLoadFailed() { |
142 if (!instance_) | 141 if (!instance_) |
143 return; | 142 return; |
144 instance_->set_load_failed(true); | 143 instance_->set_load_failed(true); |
145 for (SharedWorkerInstance::FilterList::const_iterator i = | 144 for (SharedWorkerInstance::FilterList::const_iterator i = |
146 instance_->filters().begin(); | 145 instance_->filters().begin(); |
147 i != instance_->filters().end(); ++i) { | 146 i != instance_->filters().end(); ++i) { |
148 i->filter()->Send(new ViewMsg_WorkerScriptLoadFailed(i->route_id())); | 147 i->filter()->Send(new ViewMsg_WorkerScriptLoadFailed(i->route_id())); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 Send(new_message); | 218 Send(new_message); |
220 return; | 219 return; |
221 } | 220 } |
222 } | 221 } |
223 | 222 |
224 void SharedWorkerHost::TerminateWorker() { | 223 void SharedWorkerHost::TerminateWorker() { |
225 Send(new WorkerMsg_TerminateWorkerContext(worker_route_id_)); | 224 Send(new WorkerMsg_TerminateWorkerContext(worker_route_id_)); |
226 } | 225 } |
227 | 226 |
228 } // namespace content | 227 } // namespace content |
OLD | NEW |