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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2150 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
2152 DCHECK_GT(worker_ref_count_, 0); | 2152 DCHECK_GT(worker_ref_count_, 0); |
2153 --worker_ref_count_; | 2153 --worker_ref_count_; |
2154 if (worker_ref_count_ == 0) | 2154 if (worker_ref_count_ == 0) |
2155 Cleanup(); | 2155 Cleanup(); |
2156 } | 2156 } |
2157 | 2157 |
2158 #if defined(USE_MOJO) | 2158 #if defined(USE_MOJO) |
2159 void RenderProcessHostImpl::SetWebUIHandle( | 2159 void RenderProcessHostImpl::SetWebUIHandle( |
2160 int32 view_routing_id, | 2160 int32 view_routing_id, |
2161 mojo::ScopedMessagePipeHandle handle) { | 2161 mojo::ScopedMessagePipeHandle handle) { |
2162 if (!render_process_host_mojo_) | 2162 if (!render_process_host_mojo_) |
2163 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); | 2163 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); |
2164 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); | 2164 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); |
2165 } | 2165 } |
2166 #endif | 2166 #endif |
2167 | 2167 |
2168 } // namespace content | 2168 } // namespace content |
OLD | NEW |