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

Unified Diff: content/test/data/web_ui_mojo.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 | « content/renderer/web_ui_runner.cc ('k') | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/web_ui_mojo.js
diff --git a/content/test/data/web_ui_mojo.js b/content/test/data/web_ui_mojo.js
index 086dc0041252bc901e67f7708a6d92436c7324b8..7289c665c16630a6aa2ed8ed1349ab97eb28b94b 100644
--- a/content/test/data/web_ui_mojo.js
+++ b/content/test/data/web_ui_mojo.js
@@ -5,7 +5,8 @@
define('main', [
'mojo/public/js/bindings/connection',
'content/test/data/web_ui_test_mojo_bindings.mojom',
-], function (connection, bindings) {
+ 'content/public/renderer/service_provider',
+], function (connection, bindings, serviceProvider) {
var retainedConnection;
function RendererTargetTest(bindings) {
@@ -23,8 +24,11 @@ define('main', [
this.bindings_.pingResponse();
};
- return function(handle) {
+ return function() {
retainedConnection = new connection.Connection(
- handle, RendererTargetTest, bindings.BrowserTargetProxy);
+ // TODO(sammc): Avoid using NAME_ directly.
+ serviceProvider.connectToService(bindings.BrowserTargetProxy.NAME_),
+ RendererTargetTest,
+ bindings.BrowserTargetProxy);
};
});
« no previous file with comments | « content/renderer/web_ui_runner.cc ('k') | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698