Chromium Code Reviews| 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..b87790c15ad2d84cb793e5aa5ad06b46608023a6 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() |
|
darin (slow to review)
2014/06/21 04:33:35
nit: "Wrap after binary operators, not before." fr
Sam McNally
2014/06/24 04:00:29
Done.
|
| + ->GetRemoteInterface("webui_controller", pipe.handle1.Pass()); |
| } |
| void WebUIMojo::SetHandleOnContextState(mojo::ScopedMessagePipeHandle handle) { |