From b00f9901ac257f1baaef5ffb447d5a9737dd080c Mon Sep 17 00:00:00 2001 From: ilya Date: Wed, 30 Dec 2009 14:30:28 -0800 Subject: Expose completion keys via sendRequest interface in background page. --- background_page.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index 132b9c4a..9640ab50 100644 --- a/background_page.html +++ b/background_page.html @@ -19,7 +19,9 @@ getSetting: getSetting }; - var sendRequestHandlers = {}; + var sendRequestHandlers = { + getCompletionKeys: getCompletionKeys + }; // Event handlers var selectionChangedHandlers = []; @@ -98,6 +100,13 @@ returnPort.postMessage({ zoomLevel: zoomLevel }); } + /** + * Returns the keys that can complete a valid command given the current key queue. + */ + function getCompletionKeys(request) { + return {completionKeys: generateCompletionKeys()}; + } + /* * Used by the content scripts to get settings from the local storage. */ -- cgit v1.2.3