Chromium Code Reviews| 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 914 } | 914 } |
| 915 | 915 |
| 916 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { | 916 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
| 917 DCHECK(mojo_application_host_); | 917 DCHECK(mojo_application_host_); |
| 918 return mojo_application_host_->service_registry(); | 918 return mojo_application_host_->service_registry(); |
| 919 } | 919 } |
| 920 | 920 |
| 921 void RenderProcessHostImpl::AddRoute( | 921 void RenderProcessHostImpl::AddRoute( |
| 922 int32 routing_id, | 922 int32 routing_id, |
| 923 IPC::Listener* listener) { | 923 IPC::Listener* listener) { |
| 924 DCHECK(widget_helper_->IsRoutingIDProbablyValid(routing_id)) | 924 CHECK(widget_helper_->IsRoutingIDProbablyValid(routing_id)) |
| 925 << "Found Routing ID conflicts: " << routing_id; | 925 << "Found Invalid Routing ID: " << routing_id; |
|
nasko
2014/10/16 20:08:57
Why not add the check for duplicate? If we believe
| |
| 926 listeners_.AddWithID(listener, routing_id); | 926 listeners_.AddWithID(listener, routing_id); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
| 930 DCHECK(listeners_.Lookup(routing_id) != NULL); | 930 DCHECK(listeners_.Lookup(routing_id) != NULL); |
| 931 listeners_.Remove(routing_id); | 931 listeners_.Remove(routing_id); |
| 932 | 932 |
| 933 #if defined(OS_WIN) | 933 #if defined(OS_WIN) |
| 934 // Dump the handle table if handle auditing is enabled. | 934 // Dump the handle table if handle auditing is enabled. |
| 935 const base::CommandLine& browser_command_line = | 935 const base::CommandLine& browser_command_line = |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2253 if (worker_ref_count_ == 0) | 2253 if (worker_ref_count_ == 0) |
| 2254 Cleanup(); | 2254 Cleanup(); |
| 2255 } | 2255 } |
| 2256 | 2256 |
| 2257 void RenderProcessHostImpl::EnsureMojoActivated() { | 2257 void RenderProcessHostImpl::EnsureMojoActivated() { |
| 2258 mojo_activation_required_ = true; | 2258 mojo_activation_required_ = true; |
| 2259 MaybeActivateMojo(); | 2259 MaybeActivateMojo(); |
| 2260 } | 2260 } |
| 2261 | 2261 |
| 2262 } // namespace content | 2262 } // namespace content |
| OLD | NEW |