From 0f605396ab522e1f2f48824c42bb784e9784d479 Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Thu, 9 Jul 2009 19:26:35 +0000 Subject: Make the API to open a message channel symmetric, so it works the same whether opening from a tab or extension. Also, move the callback handling back to extension_process_bindings, since I didn't need it in event_bindings to implement this, and it didn't make sense there anyway. BUG=12461 TEST=no Review URL: http://codereview.chromium.org/149237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20296 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/user_script_slave.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chrome/renderer/user_script_slave.cc') diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc index fa4eb7d..afd065f 100644 --- a/chrome/renderer/user_script_slave.cc +++ b/chrome/renderer/user_script_slave.cc @@ -26,8 +26,11 @@ static const char kUserScriptHead[] = "(function (unsafeWindow) {\n"; static const char kUserScriptTail[] = "\n})(window);"; // Creates a convenient reference to a content script's parent extension. +// TODO(mpcomplete): self.onConnect is deprecated. Remove it at 1.0. +// http://code.google.com/p/chromium/issues/detail?id=16356 static const char kInitExtension[] = - "chrome.extension = new chrome.Extension('%s')"; + "chrome.extension = new chrome.Extension('%s');" + "chrome.self.onConnect = chrome.extension.onConnect;"; UserScriptSlave::UserScriptSlave() : shared_memory_(NULL), -- cgit v1.1