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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 void RenderProcessHostImpl::RegisterMojoServices() { | 1026 void RenderProcessHostImpl::RegisterMojoServices() { |
1026 #if !defined(OS_ANDROID) | 1027 #if !defined(OS_ANDROID) |
1027 mojo_application_host_->service_registry()->AddService( | 1028 mojo_application_host_->service_registry()->AddService( |
1028 base::Bind(&device::BatteryMonitorImpl::Create)); | 1029 base::Bind(&device::BatteryMonitorImpl::Create)); |
1029 #endif | 1030 #endif |
1030 | 1031 |
1031 mojo_application_host_->service_registry()->AddService( | 1032 mojo_application_host_->service_registry()->AddService( |
1032 base::Bind(&PermissionServiceContext::CreateService, | 1033 base::Bind(&PermissionServiceContext::CreateService, |
1033 base::Unretained(permission_service_context_.get()))); | 1034 base::Unretained(permission_service_context_.get()))); |
1034 | 1035 |
| 1036 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1037 &ResourceHintsHandlerImpl::RegisterConnection, base::Unretained(this))); |
| 1038 |
1035 // TODO(mcasas): finalize arguments. | 1039 // TODO(mcasas): finalize arguments. |
1036 mojo_application_host_->service_registry()->AddService( | 1040 mojo_application_host_->service_registry()->AddService( |
1037 base::Bind(&ImageCaptureImpl::Create)); | 1041 base::Bind(&ImageCaptureImpl::Create)); |
1038 | 1042 |
1039 mojo_application_host_->service_registry()->AddService(base::Bind( | 1043 mojo_application_host_->service_registry()->AddService(base::Bind( |
1040 &BackgroundSyncContext::CreateService, | 1044 &BackgroundSyncContext::CreateService, |
1041 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1045 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
1042 | 1046 |
1043 mojo_application_host_->service_registry()->AddService(base::Bind( | 1047 mojo_application_host_->service_registry()->AddService(base::Bind( |
1044 &PlatformNotificationContextImpl::CreateService, | 1048 &PlatformNotificationContextImpl::CreateService, |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2810 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2814 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2811 | 2815 |
2812 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2816 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2813 // enough information here so that we can determine what the bad message was. | 2817 // enough information here so that we can determine what the bad message was. |
2814 base::debug::Alias(&error); | 2818 base::debug::Alias(&error); |
2815 bad_message::ReceivedBadMessage(process.get(), | 2819 bad_message::ReceivedBadMessage(process.get(), |
2816 bad_message::RPH_MOJO_PROCESS_ERROR); | 2820 bad_message::RPH_MOJO_PROCESS_ERROR); |
2817 } | 2821 } |
2818 | 2822 |
2819 } // namespace content | 2823 } // namespace content |
OLD | NEW |