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

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698