| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 browser_context_(browser_context), | 443 browser_context_(browser_context), |
| 444 storage_partition_impl_(storage_partition_impl), | 444 storage_partition_impl_(storage_partition_impl), |
| 445 sudden_termination_allowed_(true), | 445 sudden_termination_allowed_(true), |
| 446 ignore_input_events_(false), | 446 ignore_input_events_(false), |
| 447 is_isolated_guest_(is_isolated_guest), | 447 is_isolated_guest_(is_isolated_guest), |
| 448 gpu_observer_registered_(false), | 448 gpu_observer_registered_(false), |
| 449 delayed_cleanup_needed_(false), | 449 delayed_cleanup_needed_(false), |
| 450 within_process_died_observer_(false), | 450 within_process_died_observer_(false), |
| 451 power_monitor_broadcaster_(this), | 451 power_monitor_broadcaster_(this), |
| 452 worker_ref_count_(0), | 452 worker_ref_count_(0), |
| 453 permission_service_context_(new PermissionServiceContext(nullptr)), | 453 permission_service_context_(new PermissionServiceContext(this)), |
| 454 weak_factory_(this) { | 454 weak_factory_(this) { |
| 455 widget_helper_ = new RenderWidgetHelper(); | 455 widget_helper_ = new RenderWidgetHelper(); |
| 456 | 456 |
| 457 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); | 457 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); |
| 458 | 458 |
| 459 CHECK(!g_exited_main_message_loop); | 459 CHECK(!g_exited_main_message_loop); |
| 460 RegisterHost(GetID(), this); | 460 RegisterHost(GetID(), this); |
| 461 g_all_hosts.Get().set_check_on_null_data(true); | 461 g_all_hosts.Get().set_check_on_null_data(true); |
| 462 // Initialize |child_process_activity_time_| to a reasonable value. | 462 // Initialize |child_process_activity_time_| to a reasonable value. |
| 463 mark_child_process_activity_time(); | 463 mark_child_process_activity_time(); |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 | 2247 |
| 2248 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2248 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2249 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2249 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2250 DCHECK_GT(worker_ref_count_, 0); | 2250 DCHECK_GT(worker_ref_count_, 0); |
| 2251 --worker_ref_count_; | 2251 --worker_ref_count_; |
| 2252 if (worker_ref_count_ == 0) | 2252 if (worker_ref_count_ == 0) |
| 2253 Cleanup(); | 2253 Cleanup(); |
| 2254 } | 2254 } |
| 2255 | 2255 |
| 2256 } // namespace content | 2256 } // namespace content |
| OLD | NEW |