Index: chrome/browser/ui/webui/omnibox/omnibox_ui.cc |
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui.cc |
index b288fc34e0d39d1d9370f25e5dbba1d7daf74e78..1380f3cb8d70f0b6fad7f306bad6370ea694171b 100644 |
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui.cc |
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui.cc |
@@ -12,6 +12,14 @@ |
#include "content/public/browser/web_ui_data_source.h" |
#include "grit/browser_resources.h" |
+namespace { |
+ |
+struct MojoWebUIHandlerImpl : MojoWebUIHandler { |
+ OmniboxUIHandlerMojoPtr ptr; |
+}; |
+ |
+} // namespace |
+ |
OmniboxUI::OmniboxUI(content::WebUI* web_ui) : MojoWebUIController(web_ui) { |
// Set up the chrome://omnibox/ source. |
content::WebUIDataSource* html_source = |
@@ -30,8 +38,8 @@ OmniboxUI::~OmniboxUI() {} |
scoped_ptr<MojoWebUIHandler> OmniboxUI::CreateUIHandler( |
mojo::ScopedMessagePipeHandle handle_to_page) { |
- return scoped_ptr<MojoWebUIHandler>( |
- new OmniboxUIHandler( |
- ScopedOmniboxPageHandle::From(handle_to_page.Pass()).Pass(), |
- Profile::FromWebUI(web_ui()))); |
+ MojoWebUIHandlerImpl* handler = new MojoWebUIHandlerImpl(); |
+ handler->ptr.Bind(new OmniboxUIHandler(Profile::FromWebUI(web_ui()))); |
+ handler->ptr.ConfigureStub(handle_to_page.Pass()); |
+ return scoped_ptr<MojoWebUIHandler>(handler); |
} |