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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #include "content/browser/fileapi/fileapi_message_filter.h" | 68 #include "content/browser/fileapi/fileapi_message_filter.h" |
69 #include "content/browser/frame_host/render_frame_message_filter.h" | 69 #include "content/browser/frame_host/render_frame_message_filter.h" |
70 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 70 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
71 #include "content/browser/gpu/compositor_util.h" | 71 #include "content/browser/gpu/compositor_util.h" |
72 #include "content/browser/gpu/gpu_data_manager_impl.h" | 72 #include "content/browser/gpu/gpu_data_manager_impl.h" |
73 #include "content/browser/gpu/gpu_process_host.h" | 73 #include "content/browser/gpu/gpu_process_host.h" |
74 #include "content/browser/gpu/shader_disk_cache.h" | 74 #include "content/browser/gpu/shader_disk_cache.h" |
75 #include "content/browser/histogram_message_filter.h" | 75 #include "content/browser/histogram_message_filter.h" |
76 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 76 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
77 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 77 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 78 #include "content/browser/loader/resource_hints_handler_impl.h" |
78 #include "content/browser/loader/resource_message_filter.h" | 79 #include "content/browser/loader/resource_message_filter.h" |
79 #include "content/browser/loader/resource_scheduler_filter.h" | 80 #include "content/browser/loader/resource_scheduler_filter.h" |
80 #include "content/browser/media/capture/audio_mirroring_manager.h" | 81 #include "content/browser/media/capture/audio_mirroring_manager.h" |
81 #include "content/browser/media/capture/image_capture_impl.h" | 82 #include "content/browser/media/capture/image_capture_impl.h" |
82 #include "content/browser/media/media_internals.h" | 83 #include "content/browser/media/media_internals.h" |
83 #include "content/browser/media/midi_host.h" | 84 #include "content/browser/media/midi_host.h" |
84 #include "content/browser/memory/memory_message_filter.h" | 85 #include "content/browser/memory/memory_message_filter.h" |
85 #include "content/browser/message_port_message_filter.h" | 86 #include "content/browser/message_port_message_filter.h" |
86 #include "content/browser/mime_registry_impl.h" | 87 #include "content/browser/mime_registry_impl.h" |
87 #include "content/browser/mojo/constants.h" | 88 #include "content/browser/mojo/constants.h" |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 void RenderProcessHostImpl::RegisterMojoServices() { | 1069 void RenderProcessHostImpl::RegisterMojoServices() { |
1069 #if !defined(OS_ANDROID) | 1070 #if !defined(OS_ANDROID) |
1070 mojo_application_host_->service_registry()->AddService( | 1071 mojo_application_host_->service_registry()->AddService( |
1071 base::Bind(&device::BatteryMonitorImpl::Create)); | 1072 base::Bind(&device::BatteryMonitorImpl::Create)); |
1072 #endif | 1073 #endif |
1073 | 1074 |
1074 mojo_application_host_->service_registry()->AddService( | 1075 mojo_application_host_->service_registry()->AddService( |
1075 base::Bind(&PermissionServiceContext::CreateService, | 1076 base::Bind(&PermissionServiceContext::CreateService, |
1076 base::Unretained(permission_service_context_.get()))); | 1077 base::Unretained(permission_service_context_.get()))); |
1077 | 1078 |
| 1079 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1080 &ResourceHintsHandlerImpl::RegisterConnection, base::Unretained(this))); |
| 1081 |
1078 // TODO(mcasas): finalize arguments. | 1082 // TODO(mcasas): finalize arguments. |
1079 mojo_application_host_->service_registry()->AddService( | 1083 mojo_application_host_->service_registry()->AddService( |
1080 base::Bind(&ImageCaptureImpl::Create)); | 1084 base::Bind(&ImageCaptureImpl::Create)); |
1081 | 1085 |
1082 mojo_application_host_->service_registry()->AddService(base::Bind( | 1086 mojo_application_host_->service_registry()->AddService(base::Bind( |
1083 &BackgroundSyncContext::CreateService, | 1087 &BackgroundSyncContext::CreateService, |
1084 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1088 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
1085 | 1089 |
1086 mojo_application_host_->service_registry()->AddService(base::Bind( | 1090 mojo_application_host_->service_registry()->AddService(base::Bind( |
1087 &PlatformNotificationContextImpl::CreateService, | 1091 &PlatformNotificationContextImpl::CreateService, |
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2828 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2825 | 2829 |
2826 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2830 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2827 // enough information here so that we can determine what the bad message was. | 2831 // enough information here so that we can determine what the bad message was. |
2828 base::debug::Alias(&error); | 2832 base::debug::Alias(&error); |
2829 bad_message::ReceivedBadMessage(process.get(), | 2833 bad_message::ReceivedBadMessage(process.get(), |
2830 bad_message::RPH_MOJO_PROCESS_ERROR); | 2834 bad_message::RPH_MOJO_PROCESS_ERROR); |
2831 } | 2835 } |
2832 | 2836 |
2833 } // namespace content | 2837 } // namespace content |
OLD | NEW |