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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 236813002: Move Mojo channel initialization closer to IPC::Channel setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more missing deps Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_mojo_impl.cc ('k') | content/child/child_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 243b0a2c0c65d243c6029214cd2c09f7f4824b1f..3800c23a50fb4950fd7363268362e3fe99edf4d6 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -47,9 +47,11 @@
#include "content/common/frame_messages.h"
#include "content/common/input_messages.h"
#include "content/common/inter_process_time_ticks_converter.h"
+#include "content/common/mojo/mojo_service_names.h"
#include "content/common/speech_recognition_messages.h"
#include "content/common/swapped_out_messages.h"
#include "content/common/view_messages.h"
+#include "content/common/web_ui_setup.mojom.h"
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/render_widget_host_view_port.h"
#include "content/public/browser/ax_event_notification_details.h"
@@ -697,9 +699,13 @@ void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) {
}
DCHECK(renderer_initialized_);
- RenderProcessHostImpl* process =
- static_cast<RenderProcessHostImpl*>(GetProcess());
- process->SetWebUIHandle(GetRoutingID(), handle.Pass());
+
+ mojo::InterfacePipe<WebUISetup, mojo::AnyInterface> pipe;
+ mojo::RemotePtr<WebUISetup> web_ui_setup(pipe.handle_to_self.Pass(), NULL);
+ web_ui_setup->SetWebUIHandle(GetRoutingID(), handle.Pass());
+
+ static_cast<RenderProcessHostImpl*>(GetProcess())->ConnectTo(
+ kRendererService_WebUISetup, pipe.handle_to_peer.Pass());
}
#if defined(OS_ANDROID)
« no previous file with comments | « content/browser/renderer_host/render_process_host_mojo_impl.cc ('k') | content/child/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698