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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } | 1120 } |
1121 | 1121 |
1122 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 1122 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
1123 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1123 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1124 DCHECK_GT(worker_ref_count_, 0); | 1124 DCHECK_GT(worker_ref_count_, 0); |
1125 --worker_ref_count_; | 1125 --worker_ref_count_; |
1126 if (worker_ref_count_ == 0) | 1126 if (worker_ref_count_ == 0) |
1127 Cleanup(); | 1127 Cleanup(); |
1128 } | 1128 } |
1129 | 1129 |
| 1130 void RenderProcessHostImpl::PurgeAndSuspend() { |
| 1131 Send(new ChildProcessMsg_PurgeAndSuspend()); |
| 1132 } |
| 1133 |
1130 void RenderProcessHostImpl::AddRoute(int32_t routing_id, | 1134 void RenderProcessHostImpl::AddRoute(int32_t routing_id, |
1131 IPC::Listener* listener) { | 1135 IPC::Listener* listener) { |
1132 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " | 1136 CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: " |
1133 << routing_id; | 1137 << routing_id; |
1134 listeners_.AddWithID(listener, routing_id); | 1138 listeners_.AddWithID(listener, routing_id); |
1135 } | 1139 } |
1136 | 1140 |
1137 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { | 1141 void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) { |
1138 DCHECK(listeners_.Lookup(routing_id) != NULL); | 1142 DCHECK(listeners_.Lookup(routing_id) != NULL); |
1139 listeners_.Remove(routing_id); | 1143 listeners_.Remove(routing_id); |
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 | 2756 |
2753 // Skip widgets in other processes. | 2757 // Skip widgets in other processes. |
2754 if (rvh->GetProcess()->GetID() != GetID()) | 2758 if (rvh->GetProcess()->GetID() != GetID()) |
2755 continue; | 2759 continue; |
2756 | 2760 |
2757 rvh->OnWebkitPreferencesChanged(); | 2761 rvh->OnWebkitPreferencesChanged(); |
2758 } | 2762 } |
2759 } | 2763 } |
2760 | 2764 |
2761 } // namespace content | 2765 } // namespace content |
OLD | NEW |