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

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

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: Created 3 years, 8 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" 107 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
108 #include "content/browser/renderer_host/media/audio_renderer_host.h" 108 #include "content/browser/renderer_host/media/audio_renderer_host.h"
109 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" 109 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
110 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" 110 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
111 #include "content/browser/renderer_host/media/video_capture_host.h" 111 #include "content/browser/renderer_host/media/video_capture_host.h"
112 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h" 112 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h"
113 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h" 113 #include "content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h"
114 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 114 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
115 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" 115 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h"
116 #include "content/browser/renderer_host/render_message_filter.h" 116 #include "content/browser/renderer_host/render_message_filter.h"
117 #include "content/browser/renderer_host/render_message_filter_ui.h"
117 #include "content/browser/renderer_host/render_view_host_delegate.h" 118 #include "content/browser/renderer_host/render_view_host_delegate.h"
118 #include "content/browser/renderer_host/render_view_host_impl.h" 119 #include "content/browser/renderer_host/render_view_host_impl.h"
119 #include "content/browser/renderer_host/render_widget_helper.h" 120 #include "content/browser/renderer_host/render_widget_helper.h"
120 #include "content/browser/renderer_host/render_widget_host_impl.h" 121 #include "content/browser/renderer_host/render_widget_host_impl.h"
121 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h" 122 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h"
122 #include "content/browser/renderer_host/text_input_client_message_filter.h" 123 #include "content/browser/renderer_host/text_input_client_message_filter.h"
123 #include "content/browser/resolve_proxy_msg_helper.h" 124 #include "content/browser/resolve_proxy_msg_helper.h"
124 #include "content/browser/service_worker/service_worker_context_wrapper.h" 125 #include "content/browser/service_worker/service_worker_context_wrapper.h"
125 #include "content/browser/service_worker/service_worker_dispatcher_host.h" 126 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
126 #include "content/browser/shared_worker/shared_worker_message_filter.h" 127 #include "content/browser/shared_worker/shared_worker_message_filter.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 AddFilter(synchronous_compositor_filter_.get()); 1188 AddFilter(synchronous_compositor_filter_.get());
1188 #endif 1189 #endif
1189 } 1190 }
1190 1191
1191 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1192 void RenderProcessHostImpl::RegisterMojoInterfaces() {
1192 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); 1193 auto registry = base::MakeUnique<service_manager::BinderRegistry>();
1193 1194
1194 channel_->AddAssociatedInterfaceForIOThread( 1195 channel_->AddAssociatedInterfaceForIOThread(
1195 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); 1196 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_));
1196 1197
1198 AddUIThreadInterface(
1199 registry.get(),
1200 base::Bind(
1201 &RenderMessageFilterUI::CreateFilter, base::Unretained(this),
1202 base::RetainedRef(storage_partition_impl_->GetDOMStorageContext())));
1203
1197 #if defined(OS_ANDROID) 1204 #if defined(OS_ANDROID)
1198 AddUIThreadInterface( 1205 AddUIThreadInterface(
1199 registry.get(), GetGlobalJavaInterfaces() 1206 registry.get(), GetGlobalJavaInterfaces()
1200 ->CreateInterfaceFactory< 1207 ->CreateInterfaceFactory<
1201 shape_detection::mojom::FaceDetectionProvider>()); 1208 shape_detection::mojom::FaceDetectionProvider>());
1202 AddUIThreadInterface( 1209 AddUIThreadInterface(
1203 registry.get(), 1210 registry.get(),
1204 GetGlobalJavaInterfaces() 1211 GetGlobalJavaInterfaces()
1205 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>()); 1212 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>());
1206 AddUIThreadInterface( 1213 AddUIThreadInterface(
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3065 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3059 3066
3060 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3067 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3061 // Capture the error message in a crash key value. 3068 // Capture the error message in a crash key value.
3062 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3069 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3063 bad_message::ReceivedBadMessage(render_process_id, 3070 bad_message::ReceivedBadMessage(render_process_id,
3064 bad_message::RPH_MOJO_PROCESS_ERROR); 3071 bad_message::RPH_MOJO_PROCESS_ERROR);
3065 } 3072 }
3066 3073
3067 } // namespace content 3074 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698