Index: chrome/renderer/resources/renderer_extension_bindings.js |
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js |
index 0c7ef88e963fde91352b0b09ba86c1e70c3a6e03..52327c3578ec2b2b4d66cc0f0784ec88310d58c5 100644 |
--- a/chrome/renderer/resources/renderer_extension_bindings.js |
+++ b/chrome/renderer/resources/renderer_extension_bindings.js |
@@ -46,6 +46,13 @@ var chrome = chrome || {}; |
chromeHidden.Port = {}; |
+ // Returns true if the specified port id is in this context. This is used by |
+ // the C++ to avoid creating the javascript message for all the contexts that |
+ // don't care about a particular message. |
+ chromeHidden.Port.hasPort = function(portId) { |
+ return portId in ports; |
+ }; |
+ |
// Hidden port creation function. We don't want to expose an API that lets |
// people add arbitrary port IDs to the port list. |
chromeHidden.Port.createPort = function(portId, opt_name) { |