| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 } | 913 } |
| 914 | 914 |
| 915 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { | 915 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
| 916 DCHECK(mojo_application_host_); | 916 DCHECK(mojo_application_host_); |
| 917 return mojo_application_host_->service_registry(); | 917 return mojo_application_host_->service_registry(); |
| 918 } | 918 } |
| 919 | 919 |
| 920 void RenderProcessHostImpl::AddRoute( | 920 void RenderProcessHostImpl::AddRoute( |
| 921 int32 routing_id, | 921 int32 routing_id, |
| 922 IPC::Listener* listener) { | 922 IPC::Listener* listener) { |
| 923 DCHECK(widget_helper_->IsRoutingIDProbablyValid(routing_id)); |
| 923 // We already have DCHECK() in IDMap. This is for chasing | 924 // We already have DCHECK() in IDMap. This is for chasing |
| 924 // crbug.com/415059 and can be removed after fixing it. | 925 // crbug.com/415059 and can be removed after fixing it. |
| 925 CHECK(!listeners_.Lookup(routing_id)); | 926 CHECK(!listeners_.Lookup(routing_id)); |
| 926 listeners_.AddWithID(listener, routing_id); | 927 listeners_.AddWithID(listener, routing_id); |
| 927 } | 928 } |
| 928 | 929 |
| 929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 930 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
| 930 DCHECK(listeners_.Lookup(routing_id) != NULL); | 931 DCHECK(listeners_.Lookup(routing_id) != NULL); |
| 931 listeners_.Remove(routing_id); | 932 listeners_.Remove(routing_id); |
| 932 | 933 |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 if (worker_ref_count_ == 0) | 2253 if (worker_ref_count_ == 0) |
| 2253 Cleanup(); | 2254 Cleanup(); |
| 2254 } | 2255 } |
| 2255 | 2256 |
| 2256 void RenderProcessHostImpl::EnsureMojoActivated() { | 2257 void RenderProcessHostImpl::EnsureMojoActivated() { |
| 2257 mojo_activation_required_ = true; | 2258 mojo_activation_required_ = true; |
| 2258 MaybeActivateMojo(); | 2259 MaybeActivateMojo(); |
| 2259 } | 2260 } |
| 2260 | 2261 |
| 2261 } // namespace content | 2262 } // namespace content |
| OLD | NEW |