| 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/gpu/shader_cache_factory.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/loader/url_loader_factory_impl.h" | 82 #include "content/browser/loader/url_loader_factory_impl.h" |
| 83 #include "content/browser/media/capture/audio_mirroring_manager.h" | 83 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 84 #include "content/browser/media/capture/image_capture_impl.h" | 84 #include "content/browser/media/capture/image_capture_impl.h" |
| 85 #include "content/browser/media/media_internals.h" | 85 #include "content/browser/media/media_internals.h" |
| 86 #include "content/browser/media/midi_host.h" | 86 #include "content/browser/media/midi_host.h" |
| (...skipping 167 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 (ShaderCacheFactory::GetInstance()) | 264 if (GetShaderCacheFactorySingleton()) |
| 265 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 265 GetShaderCacheFactorySingleton()->SetCacheInfo(id, path); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void RemoveShaderInfo(int32_t id) { | 268 void RemoveShaderInfo(int32_t id) { |
| 269 if (ShaderCacheFactory::GetInstance()) | 269 if (GetShaderCacheFactorySingleton()) |
| 270 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 270 GetShaderCacheFactorySingleton()->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 |