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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 browser_context_(browser_context), | 449 browser_context_(browser_context), |
450 storage_partition_impl_(storage_partition_impl), | 450 storage_partition_impl_(storage_partition_impl), |
451 sudden_termination_allowed_(true), | 451 sudden_termination_allowed_(true), |
452 ignore_input_events_(false), | 452 ignore_input_events_(false), |
453 is_isolated_guest_(is_isolated_guest), | 453 is_isolated_guest_(is_isolated_guest), |
454 gpu_observer_registered_(false), | 454 gpu_observer_registered_(false), |
455 delayed_cleanup_needed_(false), | 455 delayed_cleanup_needed_(false), |
456 within_process_died_observer_(false), | 456 within_process_died_observer_(false), |
457 power_monitor_broadcaster_(this), | 457 power_monitor_broadcaster_(this), |
458 worker_ref_count_(0), | 458 worker_ref_count_(0), |
459 permission_service_context_(new PermissionServiceContext(nullptr)), | 459 permission_service_context_(new PermissionServiceContext(this)), |
460 weak_factory_(this) { | 460 weak_factory_(this) { |
461 widget_helper_ = new RenderWidgetHelper(); | 461 widget_helper_ = new RenderWidgetHelper(); |
462 | 462 |
463 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); | 463 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); |
464 | 464 |
465 CHECK(!g_exited_main_message_loop); | 465 CHECK(!g_exited_main_message_loop); |
466 RegisterHost(GetID(), this); | 466 RegisterHost(GetID(), this); |
467 g_all_hosts.Get().set_check_on_null_data(true); | 467 g_all_hosts.Get().set_check_on_null_data(true); |
468 // Initialize |child_process_activity_time_| to a reasonable value. | 468 // Initialize |child_process_activity_time_| to a reasonable value. |
469 mark_child_process_activity_time(); | 469 mark_child_process_activity_time(); |
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 | 2313 |
2314 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2314 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2315 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2315 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2316 DCHECK_GT(worker_ref_count_, 0); | 2316 DCHECK_GT(worker_ref_count_, 0); |
2317 --worker_ref_count_; | 2317 --worker_ref_count_; |
2318 if (worker_ref_count_ == 0) | 2318 if (worker_ref_count_ == 0) |
2319 Cleanup(); | 2319 Cleanup(); |
2320 } | 2320 } |
2321 | 2321 |
2322 } // namespace content | 2322 } // namespace content |
OLD | NEW |