| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "content/browser/gpu/compositor_util.h" | 73 #include "content/browser/gpu/compositor_util.h" |
| 74 #include "content/browser/gpu/gpu_data_manager_impl.h" | 74 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 75 #include "content/browser/gpu/gpu_process_host.h" | 75 #include "content/browser/gpu/gpu_process_host.h" |
| 76 #include "content/browser/gpu/shader_disk_cache.h" | 76 #include "content/browser/gpu/shader_disk_cache.h" |
| 77 #include "content/browser/histogram_message_filter.h" | 77 #include "content/browser/histogram_message_filter.h" |
| 78 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 78 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 79 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 79 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 80 #include "content/browser/loader/resource_message_filter.h" | 80 #include "content/browser/loader/resource_message_filter.h" |
| 81 #include "content/browser/loader/resource_scheduler_filter.h" | 81 #include "content/browser/loader/resource_scheduler_filter.h" |
| 82 #include "content/browser/media/capture/audio_mirroring_manager.h" | 82 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 83 #include "content/browser/media/capture/image_capture_context.h" |
| 83 #include "content/browser/media/media_internals.h" | 84 #include "content/browser/media/media_internals.h" |
| 84 #include "content/browser/media/midi_host.h" | 85 #include "content/browser/media/midi_host.h" |
| 85 #include "content/browser/memory/memory_message_filter.h" | 86 #include "content/browser/memory/memory_message_filter.h" |
| 86 #include "content/browser/message_port_message_filter.h" | 87 #include "content/browser/message_port_message_filter.h" |
| 87 #include "content/browser/mime_registry_message_filter.h" | 88 #include "content/browser/mime_registry_message_filter.h" |
| 88 #include "content/browser/mojo/constants.h" | 89 #include "content/browser/mojo/constants.h" |
| 89 #include "content/browser/mojo/mojo_application_host.h" | 90 #include "content/browser/mojo/mojo_application_host.h" |
| 90 #include "content/browser/mojo/mojo_child_connection.h" | 91 #include "content/browser/mojo/mojo_child_connection.h" |
| 91 #include "content/browser/notifications/notification_message_filter.h" | 92 #include "content/browser/notifications/notification_message_filter.h" |
| 92 #include "content/browser/permissions/permission_service_context.h" | 93 #include "content/browser/permissions/permission_service_context.h" |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 sudden_termination_allowed_(true), | 566 sudden_termination_allowed_(true), |
| 566 ignore_input_events_(false), | 567 ignore_input_events_(false), |
| 567 is_for_guests_only_(is_for_guests_only), | 568 is_for_guests_only_(is_for_guests_only), |
| 568 gpu_observer_registered_(false), | 569 gpu_observer_registered_(false), |
| 569 delayed_cleanup_needed_(false), | 570 delayed_cleanup_needed_(false), |
| 570 within_process_died_observer_(false), | 571 within_process_died_observer_(false), |
| 571 power_monitor_broadcaster_(this), | 572 power_monitor_broadcaster_(this), |
| 572 worker_ref_count_(0), | 573 worker_ref_count_(0), |
| 573 max_worker_count_(0), | 574 max_worker_count_(0), |
| 574 permission_service_context_(new PermissionServiceContext(this)), | 575 permission_service_context_(new PermissionServiceContext(this)), |
| 576 image_capture_context_(new ImageCaptureContext()), |
| 575 channel_connected_(false), | 577 channel_connected_(false), |
| 576 sent_render_process_ready_(false), | 578 sent_render_process_ready_(false), |
| 577 #if defined(OS_ANDROID) | 579 #if defined(OS_ANDROID) |
| 578 never_signaled_(true, false), | 580 never_signaled_(true, false), |
| 579 #endif | 581 #endif |
| 580 weak_factory_(this) { | 582 weak_factory_(this) { |
| 581 widget_helper_ = new RenderWidgetHelper(); | 583 widget_helper_ = new RenderWidgetHelper(); |
| 582 | 584 |
| 583 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); | 585 ChildProcessSecurityPolicyImpl::GetInstance()->Add(GetID()); |
| 584 | 586 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 base::Bind(&device::BatteryMonitorImpl::Create)); | 1067 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1066 | 1068 |
| 1067 mojo_application_host_->service_registry()->AddService( | 1069 mojo_application_host_->service_registry()->AddService( |
| 1068 base::Bind(&device::VibrationManagerImpl::Create)); | 1070 base::Bind(&device::VibrationManagerImpl::Create)); |
| 1069 #endif | 1071 #endif |
| 1070 | 1072 |
| 1071 mojo_application_host_->service_registry()->AddService( | 1073 mojo_application_host_->service_registry()->AddService( |
| 1072 base::Bind(&PermissionServiceContext::CreateService, | 1074 base::Bind(&PermissionServiceContext::CreateService, |
| 1073 base::Unretained(permission_service_context_.get()))); | 1075 base::Unretained(permission_service_context_.get()))); |
| 1074 | 1076 |
| 1077 // TODO(mcasas): finalize arguments. |
| 1078 mojo_application_host_->service_registry()->AddService( |
| 1079 base::Bind(&ImageCaptureContext::CreateService, |
| 1080 base::Unretained(image_capture_context_.get()))); |
| 1081 |
| 1075 mojo_application_host_->service_registry()->AddService(base::Bind( | 1082 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1076 &BackgroundSyncContextImpl::CreateService, | 1083 &BackgroundSyncContextImpl::CreateService, |
| 1077 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1084 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
| 1078 | 1085 |
| 1079 mojo_application_host_->service_registry()->AddService( | 1086 mojo_application_host_->service_registry()->AddService( |
| 1080 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1087 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
| 1081 base::Unretained(this))); | 1088 base::Unretained(this))); |
| 1082 | 1089 |
| 1083 #if defined(OS_ANDROID) | 1090 #if defined(OS_ANDROID) |
| 1084 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1091 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| (...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2797 | 2804 |
| 2798 // Skip widgets in other processes. | 2805 // Skip widgets in other processes. |
| 2799 if (rvh->GetProcess()->GetID() != GetID()) | 2806 if (rvh->GetProcess()->GetID() != GetID()) |
| 2800 continue; | 2807 continue; |
| 2801 | 2808 |
| 2802 rvh->OnWebkitPreferencesChanged(); | 2809 rvh->OnWebkitPreferencesChanged(); |
| 2803 } | 2810 } |
| 2804 } | 2811 } |
| 2805 | 2812 |
| 2806 } // namespace content | 2813 } // namespace content |
| OLD | NEW |