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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "content/browser/child_process_security_policy_impl.h" | 66 #include "content/browser/child_process_security_policy_impl.h" |
67 #include "content/browser/device_sensors/device_sensor_host.h" | 67 #include "content/browser/device_sensors/device_sensor_host.h" |
68 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 68 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
69 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 69 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
70 #include "content/browser/fileapi/fileapi_message_filter.h" | 70 #include "content/browser/fileapi/fileapi_message_filter.h" |
71 #include "content/browser/frame_host/render_frame_message_filter.h" | 71 #include "content/browser/frame_host/render_frame_message_filter.h" |
72 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 72 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
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/histogram_message_filter.h" | 77 #include "content/browser/histogram_message_filter.h" |
77 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 78 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
78 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 79 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
79 #include "content/browser/loader/resource_message_filter.h" | 80 #include "content/browser/loader/resource_message_filter.h" |
80 #include "content/browser/loader/resource_scheduler_filter.h" | 81 #include "content/browser/loader/resource_scheduler_filter.h" |
81 #include "content/browser/loader/url_loader_factory_impl.h" | 82 #include "content/browser/loader/url_loader_factory_impl.h" |
82 #include "content/browser/media/capture/audio_mirroring_manager.h" | 83 #include "content/browser/media/capture/audio_mirroring_manager.h" |
83 #include "content/browser/media/capture/image_capture_impl.h" | 84 #include "content/browser/media/capture/image_capture_impl.h" |
84 #include "content/browser/media/media_internals.h" | 85 #include "content/browser/media/media_internals.h" |
85 #include "content/browser/media/midi_host.h" | 86 #include "content/browser/media/midi_host.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 #include "content/public/common/service_names.mojom.h" | 163 #include "content/public/common/service_names.mojom.h" |
163 #include "content/public/common/url_constants.h" | 164 #include "content/public/common/url_constants.h" |
164 #include "device/battery/battery_monitor_impl.h" | 165 #include "device/battery/battery_monitor_impl.h" |
165 #include "device/gamepad/gamepad_monitor.h" | 166 #include "device/gamepad/gamepad_monitor.h" |
166 #include "device/power_monitor/power_monitor_message_broadcaster.h" | 167 #include "device/power_monitor/power_monitor_message_broadcaster.h" |
167 #include "device/time_zone_monitor/time_zone_monitor.h" | 168 #include "device/time_zone_monitor/time_zone_monitor.h" |
168 #include "gpu/GLES2/gl2extchromium.h" | 169 #include "gpu/GLES2/gl2extchromium.h" |
169 #include "gpu/command_buffer/client/gpu_switches.h" | 170 #include "gpu/command_buffer/client/gpu_switches.h" |
170 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
171 #include "gpu/command_buffer/service/gpu_switches.h" | 172 #include "gpu/command_buffer/service/gpu_switches.h" |
172 #include "gpu/ipc/host/shader_disk_cache.h" | |
173 #include "ipc/ipc.mojom.h" | 173 #include "ipc/ipc.mojom.h" |
174 #include "ipc/ipc_channel.h" | 174 #include "ipc/ipc_channel.h" |
175 #include "ipc/ipc_channel_mojo.h" | 175 #include "ipc/ipc_channel_mojo.h" |
176 #include "ipc/ipc_logging.h" | 176 #include "ipc/ipc_logging.h" |
177 #include "media/base/media_switches.h" | 177 #include "media/base/media_switches.h" |
178 #include "media/media_features.h" | 178 #include "media/media_features.h" |
179 #include "mojo/edk/embedder/embedder.h" | 179 #include "mojo/edk/embedder/embedder.h" |
180 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 180 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
181 #include "net/url_request/url_request_context_getter.h" | 181 #include "net/url_request/url_request_context_getter.h" |
182 #include "ppapi/features/features.h" | 182 #include "ppapi/features/features.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 namespace { | 254 namespace { |
255 | 255 |
256 const char kSiteProcessMapKeyName[] = "content_site_process_map"; | 256 const char kSiteProcessMapKeyName[] = "content_site_process_map"; |
257 | 257 |
258 #if BUILDFLAG(ENABLE_WEBRTC) | 258 #if BUILDFLAG(ENABLE_WEBRTC) |
259 const base::FilePath::CharType kAecDumpFileNameAddition[] = | 259 const base::FilePath::CharType kAecDumpFileNameAddition[] = |
260 FILE_PATH_LITERAL("aec_dump"); | 260 FILE_PATH_LITERAL("aec_dump"); |
261 #endif | 261 #endif |
262 | 262 |
263 void CacheShaderInfo(int32_t id, base::FilePath path) { | 263 void CacheShaderInfo(int32_t id, base::FilePath path) { |
264 if (gpu::ShaderCacheFactory::GetInstance()) | 264 if (ShaderCacheFactory::GetInstance()) |
265 gpu::ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 265 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); |
266 } | 266 } |
267 | 267 |
268 void RemoveShaderInfo(int32_t id) { | 268 void RemoveShaderInfo(int32_t id) { |
269 if (gpu::ShaderCacheFactory::GetInstance()) | 269 if (ShaderCacheFactory::GetInstance()) |
270 gpu::ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 270 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); |
271 } | 271 } |
272 | 272 |
273 net::URLRequestContext* GetRequestContext( | 273 net::URLRequestContext* GetRequestContext( |
274 scoped_refptr<net::URLRequestContextGetter> request_context, | 274 scoped_refptr<net::URLRequestContextGetter> request_context, |
275 scoped_refptr<net::URLRequestContextGetter> media_request_context, | 275 scoped_refptr<net::URLRequestContextGetter> media_request_context, |
276 ResourceType resource_type) { | 276 ResourceType resource_type) { |
277 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request | 277 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request |
278 // context specific to media for handling it because these resources have | 278 // context specific to media for handling it because these resources have |
279 // specific needs for caching. | 279 // specific needs for caching. |
280 if (resource_type == RESOURCE_TYPE_MEDIA) | 280 if (resource_type == RESOURCE_TYPE_MEDIA) |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3002 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3002 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3003 | 3003 |
3004 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3004 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3005 // Capture the error message in a crash key value. | 3005 // Capture the error message in a crash key value. |
3006 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3006 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3007 bad_message::ReceivedBadMessage(render_process_id, | 3007 bad_message::ReceivedBadMessage(render_process_id, |
3008 bad_message::RPH_MOJO_PROCESS_ERROR); | 3008 bad_message::RPH_MOJO_PROCESS_ERROR); |
3009 } | 3009 } |
3010 | 3010 |
3011 } // namespace content | 3011 } // namespace content |
OLD | NEW |