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

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

Issue 2446313003: Revise InterfaceRegistry API to support filtering interfaces @ Bind() time. (Closed)
Patch Set: . 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 GetID(), storage_partition_impl_->GetServiceWorkerContext())); 1215 GetID(), storage_partition_impl_->GetServiceWorkerContext()));
1216 #if defined(OS_ANDROID) 1216 #if defined(OS_ANDROID)
1217 AddFilter(new ScreenOrientationMessageFilterAndroid()); 1217 AddFilter(new ScreenOrientationMessageFilterAndroid());
1218 synchronous_compositor_filter_ = 1218 synchronous_compositor_filter_ =
1219 new SynchronousCompositorBrowserFilter(GetID()); 1219 new SynchronousCompositorBrowserFilter(GetID());
1220 AddFilter(synchronous_compositor_filter_.get()); 1220 AddFilter(synchronous_compositor_filter_.get());
1221 #endif 1221 #endif
1222 } 1222 }
1223 1223
1224 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1224 void RenderProcessHostImpl::RegisterMojoInterfaces() {
1225 std::unique_ptr<service_manager::InterfaceRegistry> registry( 1225 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>(
1226 new service_manager::InterfaceRegistry); 1226 service_manager::Identity(), service_manager::InterfaceProviderSpec());
1227 1227
1228 channel_->AddAssociatedInterface( 1228 channel_->AddAssociatedInterface(
1229 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, 1229 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
1230 base::Unretained(this))); 1230 base::Unretained(this)));
1231 1231
1232 #if defined(OS_ANDROID) 1232 #if defined(OS_ANDROID)
1233 AddUIThreadInterface(registry.get(), 1233 AddUIThreadInterface(registry.get(),
1234 GetGlobalJavaInterfaces() 1234 GetGlobalJavaInterfaces()
1235 ->CreateInterfaceFactory<device::BatteryMonitor>()); 1235 ->CreateInterfaceFactory<device::BatteryMonitor>());
1236 #else 1236 #else
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 bad_message::ReceivedBadMessage(render_process_id, 3011 bad_message::ReceivedBadMessage(render_process_id,
3012 bad_message::RPH_MOJO_PROCESS_ERROR); 3012 bad_message::RPH_MOJO_PROCESS_ERROR);
3013 } 3013 }
3014 3014
3015 void RenderProcessHostImpl::CreateURLLoaderFactory( 3015 void RenderProcessHostImpl::CreateURLLoaderFactory(
3016 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { 3016 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) {
3017 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request)); 3017 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request));
3018 } 3018 }
3019 3019
3020 } // namespace content 3020 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698