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 listeners_.AddWithID(listener, routing_id); | 924 listeners_.AddWithID(listener, routing_id); |
924 } | 925 } |
925 | 926 |
926 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 927 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
927 DCHECK(listeners_.Lookup(routing_id) != NULL); | 928 DCHECK(listeners_.Lookup(routing_id) != NULL); |
928 listeners_.Remove(routing_id); | 929 listeners_.Remove(routing_id); |
929 | 930 |
930 #if defined(OS_WIN) | 931 #if defined(OS_WIN) |
931 // Dump the handle table if handle auditing is enabled. | 932 // Dump the handle table if handle auditing is enabled. |
932 const base::CommandLine& browser_command_line = | 933 const base::CommandLine& browser_command_line = |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 if (worker_ref_count_ == 0) | 2250 if (worker_ref_count_ == 0) |
2250 Cleanup(); | 2251 Cleanup(); |
2251 } | 2252 } |
2252 | 2253 |
2253 void RenderProcessHostImpl::EnsureMojoActivated() { | 2254 void RenderProcessHostImpl::EnsureMojoActivated() { |
2254 mojo_activation_required_ = true; | 2255 mojo_activation_required_ = true; |
2255 MaybeActivateMojo(); | 2256 MaybeActivateMojo(); |
2256 } | 2257 } |
2257 | 2258 |
2258 } // namespace content | 2259 } // namespace content |
OLD | NEW |