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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 } | 916 } |
917 | 917 |
918 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { | 918 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
919 DCHECK(mojo_application_host_); | 919 DCHECK(mojo_application_host_); |
920 return mojo_application_host_->service_registry(); | 920 return mojo_application_host_->service_registry(); |
921 } | 921 } |
922 | 922 |
923 void RenderProcessHostImpl::AddRoute( | 923 void RenderProcessHostImpl::AddRoute( |
924 int32 routing_id, | 924 int32 routing_id, |
925 IPC::Listener* listener) { | 925 IPC::Listener* listener) { |
926 // We already have DCHECK() in IDMap. This is for chasing | |
927 // crbug.com/415059 and can be removed after fixing it. | |
928 CHECK(!listeners_.Lookup(routing_id)); | |
929 listeners_.AddWithID(listener, routing_id); | 926 listeners_.AddWithID(listener, routing_id); |
930 } | 927 } |
931 | 928 |
932 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
933 DCHECK(listeners_.Lookup(routing_id) != NULL); | 930 DCHECK(listeners_.Lookup(routing_id) != NULL); |
934 listeners_.Remove(routing_id); | 931 listeners_.Remove(routing_id); |
935 | 932 |
936 #if defined(OS_WIN) | 933 #if defined(OS_WIN) |
937 // Dump the handle table if handle auditing is enabled. | 934 // Dump the handle table if handle auditing is enabled. |
938 const base::CommandLine& browser_command_line = | 935 const base::CommandLine& browser_command_line = |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 if (worker_ref_count_ == 0) | 2252 if (worker_ref_count_ == 0) |
2256 Cleanup(); | 2253 Cleanup(); |
2257 } | 2254 } |
2258 | 2255 |
2259 void RenderProcessHostImpl::EnsureMojoActivated() { | 2256 void RenderProcessHostImpl::EnsureMojoActivated() { |
2260 mojo_activation_required_ = true; | 2257 mojo_activation_required_ = true; |
2261 MaybeActivateMojo(); | 2258 MaybeActivateMojo(); |
2262 } | 2259 } |
2263 | 2260 |
2264 } // namespace content | 2261 } // namespace content |
OLD | NEW |