| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 browser_context_(browser_context), | 446 browser_context_(browser_context), |
| 447 storage_partition_impl_(storage_partition_impl), | 447 storage_partition_impl_(storage_partition_impl), |
| 448 sudden_termination_allowed_(true), | 448 sudden_termination_allowed_(true), |
| 449 ignore_input_events_(false), | 449 ignore_input_events_(false), |
| 450 is_isolated_guest_(is_isolated_guest), | 450 is_isolated_guest_(is_isolated_guest), |
| 451 gpu_observer_registered_(false), | 451 gpu_observer_registered_(false), |
| 452 delayed_cleanup_needed_(false), | 452 delayed_cleanup_needed_(false), |
| 453 within_process_died_observer_(false), | 453 within_process_died_observer_(false), |
| 454 power_monitor_broadcaster_(this), | 454 power_monitor_broadcaster_(this), |
| 455 worker_ref_count_(0), | 455 worker_ref_count_(0), |
| 456 permission_service_context_(new PermissionServiceContext(nullptr)), | 456 permission_service_context_(new PermissionServiceContext(this)), |
| 457 weak_factory_(this) { | 457 weak_factory_(this) { |
| 458 widget_helper_ = new RenderWidgetHelper(); | 458 widget_helper_ = new RenderWidgetHelper(); |
| 459 | 459 |
| 460 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); | 460 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); |
| 461 | 461 |
| 462 CHECK(!g_exited_main_message_loop); | 462 CHECK(!g_exited_main_message_loop); |
| 463 RegisterHost(GetID(), this); | 463 RegisterHost(GetID(), this); |
| 464 g_all_hosts.Get().set_check_on_null_data(true); | 464 g_all_hosts.Get().set_check_on_null_data(true); |
| 465 // Initialize |child_process_activity_time_| to a reasonable value. | 465 // Initialize |child_process_activity_time_| to a reasonable value. |
| 466 mark_child_process_activity_time(); | 466 mark_child_process_activity_time(); |
| (...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 | 2269 |
| 2270 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2270 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2271 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2271 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2272 DCHECK_GT(worker_ref_count_, 0); | 2272 DCHECK_GT(worker_ref_count_, 0); |
| 2273 --worker_ref_count_; | 2273 --worker_ref_count_; |
| 2274 if (worker_ref_count_ == 0) | 2274 if (worker_ref_count_ == 0) |
| 2275 Cleanup(); | 2275 Cleanup(); |
| 2276 } | 2276 } |
| 2277 | 2277 |
| 2278 } // namespace content | 2278 } // namespace content |
| OLD | NEW |