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_proxy.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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 registry->AddInterface( | 1273 registry->AddInterface( |
1273 base::Bind(&VideoCaptureHost::Create, | 1274 base::Bind(&VideoCaptureHost::Create, |
1274 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1275 BrowserMainLoop::GetInstance()->media_stream_manager())); |
1275 | 1276 |
1276 // This is to support usage of WebSockets in cases in which there is no | 1277 // This is to support usage of WebSockets in cases in which there is no |
1277 // associated RenderFrame (e.g., Shared Workers). | 1278 // associated RenderFrame (e.g., Shared Workers). |
1278 AddUIThreadInterface( | 1279 AddUIThreadInterface( |
1279 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1280 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
1280 MSG_ROUTING_NONE)); | 1281 MSG_ROUTING_NONE)); |
1281 | 1282 |
| 1283 registry->AddInterface(base::Bind( |
| 1284 &discardable_memory::DiscardableSharedMemoryManagerProxy::Create)); |
| 1285 |
1282 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), | 1286 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), |
1283 this); | 1287 this); |
1284 | 1288 |
1285 ServiceManagerConnection* service_manager_connection = | 1289 ServiceManagerConnection* service_manager_connection = |
1286 BrowserContext::GetServiceManagerConnectionFor(browser_context_); | 1290 BrowserContext::GetServiceManagerConnectionFor(browser_context_); |
1287 std::unique_ptr<ConnectionFilterImpl> connection_filter( | 1291 std::unique_ptr<ConnectionFilterImpl> connection_filter( |
1288 new ConnectionFilterImpl(child_connection_->child_identity(), | 1292 new ConnectionFilterImpl(child_connection_->child_identity(), |
1289 std::move(registry))); | 1293 std::move(registry))); |
1290 connection_filter_controller_ = connection_filter->controller(); | 1294 connection_filter_controller_ = connection_filter->controller(); |
1291 connection_filter_id_ = service_manager_connection->AddConnectionFilter( | 1295 connection_filter_id_ = service_manager_connection->AddConnectionFilter( |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2985 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2989 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2986 | 2990 |
2987 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2991 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2988 // enough information here so that we can determine what the bad message was. | 2992 // enough information here so that we can determine what the bad message was. |
2989 base::debug::Alias(&error); | 2993 base::debug::Alias(&error); |
2990 bad_message::ReceivedBadMessage(render_process_id, | 2994 bad_message::ReceivedBadMessage(render_process_id, |
2991 bad_message::RPH_MOJO_PROCESS_ERROR); | 2995 bad_message::RPH_MOJO_PROCESS_ERROR); |
2992 } | 2996 } |
2993 | 2997 |
2994 } // namespace content | 2998 } // namespace content |
OLD | NEW |