| 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 29 matching lines...) Expand all Loading... |
| 40 #include "base/synchronization/lock.h" | 40 #include "base/synchronization/lock.h" |
| 41 #include "base/sys_info.h" | 41 #include "base/sys_info.h" |
| 42 #include "base/threading/thread.h" | 42 #include "base/threading/thread.h" |
| 43 #include "base/threading/thread_restrictions.h" | 43 #include "base/threading/thread_restrictions.h" |
| 44 #include "base/threading/thread_task_runner_handle.h" | 44 #include "base/threading/thread_task_runner_handle.h" |
| 45 #include "base/trace_event/trace_event.h" | 45 #include "base/trace_event/trace_event.h" |
| 46 #include "base/tracked_objects.h" | 46 #include "base/tracked_objects.h" |
| 47 #include "build/build_config.h" | 47 #include "build/build_config.h" |
| 48 #include "cc/base/switches.h" | 48 #include "cc/base/switches.h" |
| 49 #include "cc/output/buffer_to_texture_target_map.h" | 49 #include "cc/output/buffer_to_texture_target_map.h" |
| 50 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
| 50 #include "components/tracing/common/tracing_switches.h" | 51 #include "components/tracing/common/tracing_switches.h" |
| 51 #include "content/browser/appcache/appcache_dispatcher_host.h" | 52 #include "content/browser/appcache/appcache_dispatcher_host.h" |
| 52 #include "content/browser/appcache/chrome_appcache_service.h" | 53 #include "content/browser/appcache/chrome_appcache_service.h" |
| 53 #include "content/browser/background_sync/background_sync_service_impl.h" | 54 #include "content/browser/background_sync/background_sync_service_impl.h" |
| 54 #include "content/browser/bad_message.h" | 55 #include "content/browser/bad_message.h" |
| 55 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 56 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
| 56 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 57 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 57 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 58 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 58 #include "content/browser/browser_child_process_host_impl.h" | 59 #include "content/browser/browser_child_process_host_impl.h" |
| 59 #include "content/browser/browser_main.h" | 60 #include "content/browser/browser_main.h" |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 registry->AddInterface( | 1288 registry->AddInterface( |
| 1288 base::Bind(&VideoCaptureHost::Create, | 1289 base::Bind(&VideoCaptureHost::Create, |
| 1289 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1290 BrowserMainLoop::GetInstance()->media_stream_manager())); |
| 1290 | 1291 |
| 1291 // This is to support usage of WebSockets in cases in which there is no | 1292 // This is to support usage of WebSockets in cases in which there is no |
| 1292 // associated RenderFrame (e.g., Shared Workers). | 1293 // associated RenderFrame (e.g., Shared Workers). |
| 1293 AddUIThreadInterface( | 1294 AddUIThreadInterface( |
| 1294 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1295 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
| 1295 MSG_ROUTING_NONE)); | 1296 MSG_ROUTING_NONE)); |
| 1296 | 1297 |
| 1298 registry->AddInterface(base::Bind( |
| 1299 &discardable_memory::DiscardableSharedMemoryManager::Bind, |
| 1300 base::Unretained( |
| 1301 discardable_memory::DiscardableSharedMemoryManager::GetInstance()))); |
| 1302 |
| 1297 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), | 1303 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), |
| 1298 this); | 1304 this); |
| 1299 | 1305 |
| 1300 ServiceManagerConnection* service_manager_connection = | 1306 ServiceManagerConnection* service_manager_connection = |
| 1301 BrowserContext::GetServiceManagerConnectionFor(browser_context_); | 1307 BrowserContext::GetServiceManagerConnectionFor(browser_context_); |
| 1302 std::unique_ptr<ConnectionFilterImpl> connection_filter( | 1308 std::unique_ptr<ConnectionFilterImpl> connection_filter( |
| 1303 new ConnectionFilterImpl(child_connection_->child_identity(), | 1309 new ConnectionFilterImpl(child_connection_->child_identity(), |
| 1304 std::move(registry))); | 1310 std::move(registry))); |
| 1305 connection_filter_controller_ = connection_filter->controller(); | 1311 connection_filter_controller_ = connection_filter->controller(); |
| 1306 connection_filter_id_ = service_manager_connection->AddConnectionFilter( | 1312 connection_filter_id_ = service_manager_connection->AddConnectionFilter( |
| (...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3000 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2995 | 3001 |
| 2996 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 3002 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2997 // enough information here so that we can determine what the bad message was. | 3003 // enough information here so that we can determine what the bad message was. |
| 2998 base::debug::Alias(&error); | 3004 base::debug::Alias(&error); |
| 2999 bad_message::ReceivedBadMessage(render_process_id, | 3005 bad_message::ReceivedBadMessage(render_process_id, |
| 3000 bad_message::RPH_MOJO_PROCESS_ERROR); | 3006 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3001 } | 3007 } |
| 3002 | 3008 |
| 3003 } // namespace content | 3009 } // namespace content |
| OLD | NEW |