| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shared_worker_repository.h" | 5 #include "content/renderer/shared_worker_repository.h" |
| 6 | 6 |
| 7 #include "content/child/child_thread.h" | 7 #include "content/child/child_thread.h" |
| 8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
| 9 #include "content/renderer/render_frame_impl.h" | 9 #include "content/renderer/render_frame_impl.h" |
| 10 #include "content/renderer/websharedworker_proxy.h" | 10 #include "content/renderer/websharedworker_proxy.h" |
| 11 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" | 11 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" |
| 12 #include "third_party/WebKit/public/web/WebFrame.h" | 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 SharedWorkerRepository::SharedWorkerRepository(RenderFrameImpl* render_frame) | 16 SharedWorkerRepository::SharedWorkerRepository(RenderFrameImpl* render_frame) |
| 17 : RenderFrameObserver(render_frame) { | 17 : RenderFrameObserver(render_frame) { |
| 18 render_frame->GetWebFrame()->setSharedWorkerRepositoryClient(this); | 18 render_frame->GetWebFrame()->setSharedWorkerRepositoryClient(this); |
| 19 } | 19 } |
| 20 | 20 |
| 21 SharedWorkerRepository::~SharedWorkerRepository() {} | 21 SharedWorkerRepository::~SharedWorkerRepository() {} |
| 22 | 22 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 void SharedWorkerRepository::documentDetached(DocumentID document) { | 48 void SharedWorkerRepository::documentDetached(DocumentID document) { |
| 49 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document); | 49 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document); |
| 50 if (iter != documents_with_workers_.end()) { | 50 if (iter != documents_with_workers_.end()) { |
| 51 // Notify the browser process that the document has shut down. | 51 // Notify the browser process that the document has shut down. |
| 52 Send(new ViewHostMsg_DocumentDetached(document)); | 52 Send(new ViewHostMsg_DocumentDetached(document)); |
| 53 documents_with_workers_.erase(iter); | 53 documents_with_workers_.erase(iter); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace content | 57 } // namespace content |
| OLD | NEW |