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

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

Issue 2741203002: memory-infra: Finish moving to Mojo (3nd attempt) (Closed)
Patch Set: rebase Created 3 years, 9 months 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
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/tracing/trace_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 #include "ipc/ipc.mojom.h" 177 #include "ipc/ipc.mojom.h"
178 #include "ipc/ipc_channel.h" 178 #include "ipc/ipc_channel.h"
179 #include "ipc/ipc_channel_mojo.h" 179 #include "ipc/ipc_channel_mojo.h"
180 #include "ipc/ipc_logging.h" 180 #include "ipc/ipc_logging.h"
181 #include "media/base/media_switches.h" 181 #include "media/base/media_switches.h"
182 #include "media/media_features.h" 182 #include "media/media_features.h"
183 #include "mojo/edk/embedder/embedder.h" 183 #include "mojo/edk/embedder/embedder.h"
184 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 184 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
185 #include "net/url_request/url_request_context_getter.h" 185 #include "net/url_request/url_request_context_getter.h"
186 #include "ppapi/features/features.h" 186 #include "ppapi/features/features.h"
187 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
187 #include "services/service_manager/public/cpp/connection.h" 188 #include "services/service_manager/public/cpp/connection.h"
188 #include "services/service_manager/public/cpp/connector.h" 189 #include "services/service_manager/public/cpp/connector.h"
189 #include "services/service_manager/public/cpp/interface_provider.h" 190 #include "services/service_manager/public/cpp/interface_provider.h"
190 #include "services/service_manager/public/cpp/interface_registry.h" 191 #include "services/service_manager/public/cpp/interface_registry.h"
191 #include "services/service_manager/runner/common/client_util.h" 192 #include "services/service_manager/runner/common/client_util.h"
192 #include "services/service_manager/runner/common/switches.h" 193 #include "services/service_manager/runner/common/switches.h"
193 #include "services/shape_detection/public/interfaces/barcodedetection.mojom.h" 194 #include "services/shape_detection/public/interfaces/barcodedetection.mojom.h"
194 #include "services/shape_detection/public/interfaces/constants.mojom.h" 195 #include "services/shape_detection/public/interfaces/constants.mojom.h"
195 #include "services/shape_detection/public/interfaces/facedetection_provider.mojo m.h" 196 #include "services/shape_detection/public/interfaces/facedetection_provider.mojo m.h"
196 #include "services/shape_detection/public/interfaces/textdetection.mojom.h" 197 #include "services/shape_detection/public/interfaces/textdetection.mojom.h"
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 if (!service_manager::ServiceManagerIsRemote()) { 1341 if (!service_manager::ServiceManagerIsRemote()) {
1341 discardable_memory::DiscardableSharedMemoryManager* manager = 1342 discardable_memory::DiscardableSharedMemoryManager* manager =
1342 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager(); 1343 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager();
1343 registry->AddInterface( 1344 registry->AddInterface(
1344 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind, 1345 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind,
1345 base::Unretained(manager))); 1346 base::Unretained(manager)));
1346 } 1347 }
1347 1348
1348 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); 1349 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create));
1349 1350
1351 AddUIThreadInterface(
1352 registry.get(),
1353 base::Bind(
1354 &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
1355 base::Unretained(
1356 memory_instrumentation::CoordinatorImpl::GetInstance())));
1357
1350 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), 1358 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(),
1351 this); 1359 this);
1352 1360
1353 ServiceManagerConnection* service_manager_connection = 1361 ServiceManagerConnection* service_manager_connection =
1354 BrowserContext::GetServiceManagerConnectionFor(browser_context_); 1362 BrowserContext::GetServiceManagerConnectionFor(browser_context_);
1355 std::unique_ptr<ConnectionFilterImpl> connection_filter( 1363 std::unique_ptr<ConnectionFilterImpl> connection_filter(
1356 new ConnectionFilterImpl(child_connection_->child_identity(), 1364 new ConnectionFilterImpl(child_connection_->child_identity(),
1357 std::move(registry))); 1365 std::move(registry)));
1358 connection_filter_controller_ = connection_filter->controller(); 1366 connection_filter_controller_ = connection_filter->controller();
1359 connection_filter_id_ = service_manager_connection->AddConnectionFilter( 1367 connection_filter_id_ = service_manager_connection->AddConnectionFilter(
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3086 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3079 3087
3080 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3088 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3081 // Capture the error message in a crash key value. 3089 // Capture the error message in a crash key value.
3082 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3090 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3083 bad_message::ReceivedBadMessage(render_process_id, 3091 bad_message::ReceivedBadMessage(render_process_id,
3084 bad_message::RPH_MOJO_PROCESS_ERROR); 3092 bad_message::RPH_MOJO_PROCESS_ERROR);
3085 } 3093 }
3086 3094
3087 } // namespace content 3095 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/tracing/trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698