Index: content/renderer/web_ui_mojo.cc |
diff --git a/content/renderer/web_ui_mojo.cc b/content/renderer/web_ui_mojo.cc |
index 38c71d5c1c6574b3e7383701b26e29cf1b313267..4ff9230fbcd743dbe0a144ec3aa51bcdbb078af4 100644 |
--- a/content/renderer/web_ui_mojo.cc |
+++ b/content/renderer/web_ui_mojo.cc |
@@ -5,6 +5,7 @@ |
#include "content/renderer/web_ui_mojo.h" |
#include "content/common/view_messages.h" |
+#include "content/public/common/service_registry.h" |
#include "content/public/renderer/render_frame.h" |
#include "content/public/renderer/render_view.h" |
#include "content/renderer/web_ui_mojo_context_state.h" |
@@ -84,8 +85,11 @@ void WebUIMojo::DestroyContextState(v8::Handle<v8::Context> context) { |
void WebUIMojo::OnDidFinishDocumentLoad() { |
did_finish_document_load_ = true; |
- if (pending_handle_.is_valid()) |
- SetHandleOnContextState(pending_handle_.Pass()); |
+ mojo::MessagePipe pipe; |
+ SetHandleOnContextState(pipe.handle0.Pass()); |
+ RenderFrame::FromWebFrame(render_view()->GetWebView()->mainFrame())-> |
+ GetServiceRegistry()-> |
+ GetRemoteInterface("webui_controller", pipe.handle1.Pass()); |
} |
void WebUIMojo::SetHandleOnContextState(mojo::ScopedMessagePipeHandle handle) { |