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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1903 | 1903 |
1904 // child_process_launcher_ can be NULL in single process mode or if fast | 1904 // child_process_launcher_ can be NULL in single process mode or if fast |
1905 // termination happened. | 1905 // termination happened. |
1906 int exit_code = 0; | 1906 int exit_code = 0; |
1907 base::TerminationStatus status = | 1907 base::TerminationStatus status = |
1908 child_process_launcher_.get() ? | 1908 child_process_launcher_.get() ? |
1909 child_process_launcher_->GetChildTerminationStatus(already_dead, | 1909 child_process_launcher_->GetChildTerminationStatus(already_dead, |
1910 &exit_code) : | 1910 &exit_code) : |
1911 base::TERMINATION_STATUS_NORMAL_TERMINATION; | 1911 base::TERMINATION_STATUS_NORMAL_TERMINATION; |
1912 | 1912 |
1913 RendererClosedDetails details(GetHandle(), status, exit_code); | 1913 RendererClosedDetails details(status, exit_code); |
1914 mojo_application_host_->WillDestroySoon(); | 1914 mojo_application_host_->WillDestroySoon(); |
1915 | 1915 |
1916 child_process_launcher_.reset(); | 1916 child_process_launcher_.reset(); |
1917 channel_.reset(); | 1917 channel_.reset(); |
1918 | 1918 |
1919 within_process_died_observer_ = true; | 1919 within_process_died_observer_ = true; |
1920 NotificationService::current()->Notify( | 1920 NotificationService::current()->Notify( |
1921 NOTIFICATION_RENDERER_PROCESS_CLOSED, | 1921 NOTIFICATION_RENDERER_PROCESS_CLOSED, |
1922 Source<RenderProcessHost>(this), | 1922 Source<RenderProcessHost>(this), |
1923 Details<RendererClosedDetails>(&details)); | 1923 Details<RendererClosedDetails>(&details)); |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 | 2240 |
2241 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2241 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2242 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2242 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2243 DCHECK_GT(worker_ref_count_, 0); | 2243 DCHECK_GT(worker_ref_count_, 0); |
2244 --worker_ref_count_; | 2244 --worker_ref_count_; |
2245 if (worker_ref_count_ == 0) | 2245 if (worker_ref_count_ == 0) |
2246 Cleanup(); | 2246 Cleanup(); |
2247 } | 2247 } |
2248 | 2248 |
2249 } // namespace content | 2249 } // namespace content |
OLD | NEW |