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

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

Issue 2217013002: Remove the JNI-based InterfaceRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-interface-registry-migration
Patch Set: rebase Created 4 years, 2 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
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 #include "ui/base/ui_base_switches.h" 186 #include "ui/base/ui_base_switches.h"
187 #include "ui/display/display_switches.h" 187 #include "ui/display/display_switches.h"
188 #include "ui/events/event_switches.h" 188 #include "ui/events/event_switches.h"
189 #include "ui/gfx/switches.h" 189 #include "ui/gfx/switches.h"
190 #include "ui/gl/gl_switches.h" 190 #include "ui/gl/gl_switches.h"
191 #include "ui/gl/gpu_switching_manager.h" 191 #include "ui/gl/gpu_switching_manager.h"
192 #include "ui/native_theme/native_theme_switches.h" 192 #include "ui/native_theme/native_theme_switches.h"
193 193
194 #if defined(OS_ANDROID) 194 #if defined(OS_ANDROID)
195 #include "content/browser/android/child_process_launcher_android.h" 195 #include "content/browser/android/child_process_launcher_android.h"
196 #include "content/browser/mojo/interface_registrar_android.h"
197 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" 196 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h"
198 #include "content/public/browser/android/java_interfaces.h" 197 #include "content/public/browser/android/java_interfaces.h"
199 #include "ipc/ipc_sync_channel.h" 198 #include "ipc/ipc_sync_channel.h"
200 #include "media/audio/android/audio_manager_android.h" 199 #include "media/audio/android/audio_manager_android.h"
201 #endif 200 #endif
202 201
203 #if defined(OS_WIN) 202 #if defined(OS_WIN)
204 #include "base/win/scoped_com_initializer.h" 203 #include "base/win/scoped_com_initializer.h"
205 #include "base/win/windows_version.h" 204 #include "base/win/windows_version.h"
206 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" 205 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h"
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 AddFilter(new PushMessagingMessageFilter( 1207 AddFilter(new PushMessagingMessageFilter(
1209 GetID(), storage_partition_impl_->GetServiceWorkerContext())); 1208 GetID(), storage_partition_impl_->GetServiceWorkerContext()));
1210 #if defined(OS_ANDROID) 1209 #if defined(OS_ANDROID)
1211 AddFilter(new ScreenOrientationMessageFilterAndroid()); 1210 AddFilter(new ScreenOrientationMessageFilterAndroid());
1212 #endif 1211 #endif
1213 } 1212 }
1214 1213
1215 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1214 void RenderProcessHostImpl::RegisterMojoInterfaces() {
1216 std::unique_ptr<shell::InterfaceRegistry> registry( 1215 std::unique_ptr<shell::InterfaceRegistry> registry(
1217 new shell::InterfaceRegistry); 1216 new shell::InterfaceRegistry);
1218 #if defined(OS_ANDROID)
1219 interface_registry_android_ =
1220 InterfaceRegistryAndroid::Create(registry.get());
1221 InterfaceRegistrarAndroid::ExposeInterfacesToRenderer(
1222 interface_registry_android_.get());
1223 #endif
1224 1217
1225 channel_->AddAssociatedInterface( 1218 channel_->AddAssociatedInterface(
1226 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, 1219 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
1227 base::Unretained(this))); 1220 base::Unretained(this)));
1228 1221
1229 #if defined(OS_ANDROID) 1222 #if defined(OS_ANDROID)
1230 AddUIThreadInterface(registry.get(), 1223 AddUIThreadInterface(registry.get(),
1231 GetGlobalJavaInterfaces() 1224 GetGlobalJavaInterfaces()
1232 ->CreateInterfaceFactory<device::BatteryMonitor>()); 1225 ->CreateInterfaceFactory<device::BatteryMonitor>());
1233 #else 1226 #else
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3035 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3043 3036
3044 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 3037 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
3045 // enough information here so that we can determine what the bad message was. 3038 // enough information here so that we can determine what the bad message was.
3046 base::debug::Alias(&error); 3039 base::debug::Alias(&error);
3047 bad_message::ReceivedBadMessage(process.get(), 3040 bad_message::ReceivedBadMessage(process.get(),
3048 bad_message::RPH_MOJO_PROCESS_ERROR); 3041 bad_message::RPH_MOJO_PROCESS_ERROR);
3049 } 3042 }
3050 3043
3051 } // namespace content 3044 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698