| 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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 1157 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 1158 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1158 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1159 DCHECK_GT(worker_ref_count_, 0); | 1159 DCHECK_GT(worker_ref_count_, 0); |
| 1160 --worker_ref_count_; | 1160 --worker_ref_count_; |
| 1161 if (worker_ref_count_ == 0) | 1161 if (worker_ref_count_ == 0) |
| 1162 Cleanup(); | 1162 Cleanup(); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 void RenderProcessHostImpl::PurgeAndSuspend() { |
| 1166 Send(new ChildProcessMsg_PurgeAndSuspend()); |
| 1167 } |
| 1168 |
| 1165 void RenderProcessHostImpl::AddRoute(int32_t routing_id, | 1169 void RenderProcessHostImpl::AddRoute(int32_t routing_id, |
| 1166 IPC::Listener* listener) { | 1170 IPC::Listener* listener) { |
| 1167 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " | 1171 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " |
| 1168 << routing_id; | 1172 << routing_id; |
| 1169 listeners_.AddWithID(listener, routing_id); | 1173 listeners_.AddWithID(listener, routing_id); |
| 1170 } | 1174 } |
| 1171 | 1175 |
| 1172 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { | 1176 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { |
| 1173 DCHECK(listeners_.Lookup(routing_id) != NULL); | 1177 DCHECK(listeners_.Lookup(routing_id) != NULL); |
| 1174 listeners_.Remove(routing_id); | 1178 listeners_.Remove(routing_id); |
| (...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2797 | 2801 |
| 2798 // Skip widgets in other processes. | 2802 // Skip widgets in other processes. |
| 2799 if (rvh->GetProcess()->GetID() != GetID()) | 2803 if (rvh->GetProcess()->GetID() != GetID()) |
| 2800 continue; | 2804 continue; |
| 2801 | 2805 |
| 2802 rvh->OnWebkitPreferencesChanged(); | 2806 rvh->OnWebkitPreferencesChanged(); |
| 2803 } | 2807 } |
| 2804 } | 2808 } |
| 2805 | 2809 |
| 2806 } // namespace content | 2810 } // namespace content |
| OLD | NEW |