Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2485623002: discardable_memory: Using mojo IPC to replace Chrome IPC (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 registry->AddInterface( 1286 registry->AddInterface(
1286 base::Bind(&VideoCaptureHost::Create, 1287 base::Bind(&VideoCaptureHost::Create,
1287 BrowserMainLoop::GetInstance()->media_stream_manager())); 1288 BrowserMainLoop::GetInstance()->media_stream_manager()));
1288 1289
1289 // This is to support usage of WebSockets in cases in which there is no 1290 // This is to support usage of WebSockets in cases in which there is no
1290 // associated RenderFrame (e.g., Shared Workers). 1291 // associated RenderFrame (e.g., Shared Workers).
1291 AddUIThreadInterface( 1292 AddUIThreadInterface(
1292 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), 1293 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(),
1293 MSG_ROUTING_NONE)); 1294 MSG_ROUTING_NONE));
1294 1295
1296 registry->AddInterface(
1297 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind));
1298
1295 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), 1299 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(),
1296 this); 1300 this);
1297 1301
1298 ServiceManagerConnection* service_manager_connection = 1302 ServiceManagerConnection* service_manager_connection =
1299 BrowserContext::GetServiceManagerConnectionFor(browser_context_); 1303 BrowserContext::GetServiceManagerConnectionFor(browser_context_);
1300 std::unique_ptr<ConnectionFilterImpl> connection_filter( 1304 std::unique_ptr<ConnectionFilterImpl> connection_filter(
1301 new ConnectionFilterImpl(child_connection_->child_identity(), 1305 new ConnectionFilterImpl(child_connection_->child_identity(),
1302 std::move(registry))); 1306 std::move(registry)));
1303 connection_filter_controller_ = connection_filter->controller(); 1307 connection_filter_controller_ = connection_filter->controller();
1304 connection_filter_id_ = service_manager_connection->AddConnectionFilter( 1308 connection_filter_id_ = service_manager_connection->AddConnectionFilter(
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3001 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2998 3002
2999 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 3003 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
3000 // enough information here so that we can determine what the bad message was. 3004 // enough information here so that we can determine what the bad message was.
3001 base::debug::Alias(&error); 3005 base::debug::Alias(&error);
3002 bad_message::ReceivedBadMessage(render_process_id, 3006 bad_message::ReceivedBadMessage(render_process_id,
3003 bad_message::RPH_MOJO_PROCESS_ERROR); 3007 bad_message::RPH_MOJO_PROCESS_ERROR);
3004 } 3008 }
3005 3009
3006 } // namespace content 3010 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698