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_impl.h" | 7 #include "content/child/child_thread_impl.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" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 void SharedWorkerRepository::documentDetached(DocumentID document) { | 53 void SharedWorkerRepository::documentDetached(DocumentID document) { |
54 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document); | 54 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document); |
55 if (iter != documents_with_workers_.end()) { | 55 if (iter != documents_with_workers_.end()) { |
56 // Notify the browser process that the document has shut down. | 56 // Notify the browser process that the document has shut down. |
57 Send(new ViewHostMsg_DocumentDetached(document)); | 57 Send(new ViewHostMsg_DocumentDetached(document)); |
58 documents_with_workers_.erase(iter); | 58 documents_with_workers_.erase(iter); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
| 62 void SharedWorkerRepository::OnDestruct() { |
| 63 delete this; |
| 64 } |
| 65 |
62 } // namespace content | 66 } // namespace content |
OLD | NEW |