diff options
author | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 15:16:45 +0000 |
---|---|---|
committer | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 15:16:45 +0000 |
commit | adc2ccf7987a58fb73f2749d98cd49aae56c3700 (patch) | |
tree | a93b3de0ef8455799068ee77ce907a2635ccd033 /chrome/renderer/resources | |
parent | 6c3b5326b5e35d548f96496810164e596d7b210e (diff) | |
download | chromium_src-adc2ccf7987a58fb73f2749d98cd49aae56c3700.zip chromium_src-adc2ccf7987a58fb73f2749d98cd49aae56c3700.tar.gz chromium_src-adc2ccf7987a58fb73f2749d98cd49aae56c3700.tar.bz2 |
add mole collapse/expand events. convert mappy to use this.
BUG=15494
TEST=browser_tests.exe --gtest_filter=ExtensionApiTest.Toolstrip
Review URL: http://codereview.chromium.org/203023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r-- | chrome/renderer/resources/extension_process_bindings.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 4312d04..657baec 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -19,6 +19,7 @@ var chrome = chrome || {}; native function GetChromeHidden(); native function GetNextRequestId(); native function OpenChannelToTab(); + native function GetRenderViewId(); if (!chrome) chrome = {}; @@ -182,6 +183,14 @@ var chrome = chrome || {}; } } + function setupToolstripEvents(renderViewId) { + chrome.toolstrip = chrome.toolstrip || {}; + chrome.toolstrip.onExpanded = + new chrome.Event("toolstrip.onExpanded." + renderViewId); + chrome.toolstrip.onCollapsed = + new chrome.Event("toolstrip.onCollapsed." + renderViewId); + } + chromeHidden.onLoad.addListener(function (extensionId) { chrome.extension = new chrome.Extension(extensionId); @@ -298,5 +307,6 @@ var chrome = chrome || {}; } setupPageActionEvents(extensionId); + setupToolstripEvents(GetRenderViewId()); }); })(); |