OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 } | 1121 } |
1122 | 1122 |
1123 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 1123 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
1124 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1124 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1125 DCHECK_GT(worker_ref_count_, 0); | 1125 DCHECK_GT(worker_ref_count_, 0); |
1126 --worker_ref_count_; | 1126 --worker_ref_count_; |
1127 if (worker_ref_count_ == 0) | 1127 if (worker_ref_count_ == 0) |
1128 Cleanup(); | 1128 Cleanup(); |
1129 } | 1129 } |
1130 | 1130 |
| 1131 void RenderProcessHostImpl::PurgeAndSuspend() { |
| 1132 Send(new ChildProcessMsg_PurgeAndSuspend()); |
| 1133 } |
| 1134 |
1131 void RenderProcessHostImpl::AddRoute(int32_t routing_id, | 1135 void RenderProcessHostImpl::AddRoute(int32_t routing_id, |
1132 IPC::Listener* listener) { | 1136 IPC::Listener* listener) { |
1133 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " | 1137 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " |
1134 << routing_id; | 1138 << routing_id; |
1135 listeners_.AddWithID(listener, routing_id); | 1139 listeners_.AddWithID(listener, routing_id); |
1136 } | 1140 } |
1137 | 1141 |
1138 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { | 1142 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { |
1139 DCHECK(listeners_.Lookup(routing_id) != NULL); | 1143 DCHECK(listeners_.Lookup(routing_id) != NULL); |
1140 listeners_.Remove(routing_id); | 1144 listeners_.Remove(routing_id); |
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 | 2766 |
2763 // Skip widgets in other processes. | 2767 // Skip widgets in other processes. |
2764 if (rvh->GetProcess()->GetID() != GetID()) | 2768 if (rvh->GetProcess()->GetID() != GetID()) |
2765 continue; | 2769 continue; |
2766 | 2770 |
2767 rvh->OnWebkitPreferencesChanged(); | 2771 rvh->OnWebkitPreferencesChanged(); |
2768 } | 2772 } |
2769 } | 2773 } |
2770 | 2774 |
2771 } // namespace content | 2775 } // namespace content |
OLD | NEW |