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 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2042 RenderProcessExited(this, status, exit_code)); | 2042 RenderProcessExited(this, status, exit_code)); |
2043 within_process_died_observer_ = false; | 2043 within_process_died_observer_ = false; |
2044 | 2044 |
2045 gpu_message_filter_ = NULL; | 2045 gpu_message_filter_ = NULL; |
2046 message_port_message_filter_ = NULL; | 2046 message_port_message_filter_ = NULL; |
2047 #if defined(ENABLE_BROWSER_CDMS) | 2047 #if defined(ENABLE_BROWSER_CDMS) |
2048 browser_cdm_manager_ = NULL; | 2048 browser_cdm_manager_ = NULL; |
2049 #endif | 2049 #endif |
2050 RemoveUserData(kSessionStorageHolderKey); | 2050 RemoveUserData(kSessionStorageHolderKey); |
2051 | 2051 |
2052 mojo_application_host_.reset(new MojoApplicationHost); | |
Avi (use Gerrit)
2015/01/13 19:20:33
As a non-mojo type, a comment would be good here.
Marshall
2015/01/13 19:36:42
Done.
| |
2053 | |
2052 IDMap<IPC::Listener>::iterator iter(&listeners_); | 2054 IDMap<IPC::Listener>::iterator iter(&listeners_); |
2053 while (!iter.IsAtEnd()) { | 2055 while (!iter.IsAtEnd()) { |
2054 iter.GetCurrentValue()->OnMessageReceived( | 2056 iter.GetCurrentValue()->OnMessageReceived( |
2055 ViewHostMsg_RenderProcessGone(iter.GetCurrentKey(), | 2057 ViewHostMsg_RenderProcessGone(iter.GetCurrentKey(), |
2056 static_cast<int>(status), | 2058 static_cast<int>(status), |
2057 exit_code)); | 2059 exit_code)); |
2058 iter.Advance(); | 2060 iter.Advance(); |
2059 } | 2061 } |
2060 | 2062 |
2061 mojo_application_host_.reset(new MojoApplicationHost); | |
2062 | |
2063 // It's possible that one of the calls out to the observers might have caused | 2063 // It's possible that one of the calls out to the observers might have caused |
2064 // this object to be no longer needed. | 2064 // this object to be no longer needed. |
2065 if (delayed_cleanup_needed_) | 2065 if (delayed_cleanup_needed_) |
2066 Cleanup(); | 2066 Cleanup(); |
2067 | 2067 |
2068 // This object is not deleted at this point and might be reused later. | 2068 // This object is not deleted at this point and might be reused later. |
2069 // TODO(darin): clean this up | 2069 // TODO(darin): clean this up |
2070 } | 2070 } |
2071 | 2071 |
2072 int RenderProcessHostImpl::GetActiveViewCount() { | 2072 int RenderProcessHostImpl::GetActiveViewCount() { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2359 | 2359 |
2360 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2360 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2361 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2361 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2362 DCHECK_GT(worker_ref_count_, 0); | 2362 DCHECK_GT(worker_ref_count_, 0); |
2363 --worker_ref_count_; | 2363 --worker_ref_count_; |
2364 if (worker_ref_count_ == 0) | 2364 if (worker_ref_count_ == 0) |
2365 Cleanup(); | 2365 Cleanup(); |
2366 } | 2366 } |
2367 | 2367 |
2368 } // namespace content | 2368 } // namespace content |
OLD | NEW |