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

Unified Diff: chrome/browser/resources/omnibox/omnibox.js

Issue 302573002: Add a Javascript wrapper around ServiceRegistry and expose it to WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render-view-shell
Patch Set: address comments Created 6 years, 5 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 | « no previous file | chrome/browser/ui/webui/mojo_web_ui_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/omnibox/omnibox.js
diff --git a/chrome/browser/resources/omnibox/omnibox.js b/chrome/browser/resources/omnibox/omnibox.js
index e99c9429c2525c4302af997c0d94c90d2040fbac..3e570c7e0eee5d970ac914b1ef1796f00ed3d688 100644
--- a/chrome/browser/resources/omnibox/omnibox.js
+++ b/chrome/browser/resources/omnibox/omnibox.js
@@ -19,7 +19,8 @@
define('main', [
'mojo/public/js/bindings/connection',
'chrome/browser/ui/webui/omnibox/omnibox.mojom',
-], function(connector, browser) {
+ 'content/public/renderer/service_provider',
+], function(connector, browser, serviceProvider) {
'use strict';
var connection;
@@ -432,8 +433,12 @@ define('main', [
refresh();
};
- return function(handle) {
- connection = new connector.Connection(handle, OmniboxPageImpl,
- browser.OmniboxUIHandlerMojoProxy);
+ return function() {
+ connection = new connector.Connection(
+ // TODO(sammc): Avoid using NAME_ directly.
+ serviceProvider.connectToService(
+ browser.OmniboxUIHandlerMojoProxy.NAME_),
+ OmniboxPageImpl,
+ browser.OmniboxUIHandlerMojoProxy);
};
});
« no previous file with comments | « no previous file | chrome/browser/ui/webui/mojo_web_ui_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698