| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 | 131 |
| 132 void SharedWorkerHost::WorkerContextDestroyed() { | 132 void SharedWorkerHost::WorkerContextDestroyed() { |
| 133 if (!instance_) | 133 if (!instance_) |
| 134 return; | 134 return; |
| 135 instance_.reset(); | 135 instance_.reset(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void SharedWorkerHost::WorkerScriptLoaded() { | 138 void SharedWorkerHost::WorkerScriptLoaded() { |
| 139 // TODO(horo): implement this. | 139 // TODO(horo): implement this. |
| 140 NOTIMPLEMENTED(); | |
| 141 } | 140 } |
| 142 | 141 |
| 143 void SharedWorkerHost::WorkerScriptLoadFailed() { | 142 void SharedWorkerHost::WorkerScriptLoadFailed() { |
| 144 if (!instance_) | 143 if (!instance_) |
| 145 return; | 144 return; |
| 146 instance_->set_load_failed(true); | 145 instance_->set_load_failed(true); |
| 147 for (SharedWorkerInstance::FilterList::const_iterator i = | 146 for (SharedWorkerInstance::FilterList::const_iterator i = |
| 148 instance_->filters().begin(); | 147 instance_->filters().begin(); |
| 149 i != instance_->filters().end(); ++i) { | 148 i != instance_->filters().end(); ++i) { |
| 150 i->filter()->Send(new ViewMsg_WorkerScriptLoadFailed(i->route_id())); | 149 i->filter()->Send(new ViewMsg_WorkerScriptLoadFailed(i->route_id())); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 documents.begin(); | 248 documents.begin(); |
| 250 doc != documents.end(); | 249 doc != documents.end(); |
| 251 ++doc) { | 250 ++doc) { |
| 252 result.push_back( | 251 result.push_back( |
| 253 std::make_pair(doc->render_process_id(), doc->render_frame_id())); | 252 std::make_pair(doc->render_process_id(), doc->render_frame_id())); |
| 254 } | 253 } |
| 255 return result; | 254 return result; |
| 256 } | 255 } |
| 257 | 256 |
| 258 } // namespace content | 257 } // namespace content |
| OLD | NEW |