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

Unified Diff: extensions/renderer/resources/runtime_custom_bindings.js

Issue 2641863003: [Extensions Bindings] Add a messaging test (Closed)
Patch Set: . Created 3 years, 11 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 | « chrome/test/data/extensions/api_test/native_bindings/messaging_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/runtime_custom_bindings.js
diff --git a/extensions/renderer/resources/runtime_custom_bindings.js b/extensions/renderer/resources/runtime_custom_bindings.js
index fb461061cd5d73e56b5e09ff7513eb7c8b01880b..00a86a2239cfca7ce35bfcc08e963575b35cc79e 100644
--- a/extensions/renderer/resources/runtime_custom_bindings.js
+++ b/extensions/renderer/resources/runtime_custom_bindings.js
@@ -4,7 +4,7 @@
// Custom binding for the runtime API.
-var binding = require('binding').Binding.create('runtime');
+var binding = apiBridge || require('binding').Binding.create('runtime');
var messaging = require('messaging');
var runtimeNatives = requireNative('runtime');
@@ -188,4 +188,5 @@ binding.registerCustomHook(function(binding, id, contextType) {
});
exports.$set('bindDirectoryEntryCallback', bindDirectoryEntryCallback);
-exports.$set('binding', binding.generate());
+if (!apiBridge)
+ exports.$set('binding', binding.generate());
« no previous file with comments | « chrome/test/data/extensions/api_test/native_bindings/messaging_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698