Index: chrome/renderer/resources/extensions/searchbox_api.js |
diff --git a/chrome/renderer/resources/extensions/searchbox_api.js b/chrome/renderer/resources/extensions/searchbox_api.js |
index e7fc4e0f8c24e540ded492d17dbd170e6c95d86f..c9d6589a0d2e19656d2a74938ec33b69bd13870b 100644 |
--- a/chrome/renderer/resources/extensions/searchbox_api.js |
+++ b/chrome/renderer/resources/extensions/searchbox_api.js |
@@ -15,7 +15,14 @@ if (!chrome.searchBox) { |
native function GetY(); |
native function GetWidth(); |
native function GetHeight(); |
+ native function GetAutocompleteResults(); |
sreeram
2012/08/13 16:37:08
Don't we need all the shadow DOM stuff here?
Shishir
2012/08/13 18:11:12
Done.
|
+ native function GetKeyCode(); |
native function SetSuggestions(); |
+ native function SetSuggestionInline(); |
+ native function SetAutocompleteResultInline(); |
+ native function SetSuggestionReplace(); |
+ native function SetAutocompleteResultReplace(); |
+ native function SetNonNativeDropdownHeight(); |
sreeram
2012/08/13 16:37:08
This is a good opportunity to rename some of these
Shishir
2012/08/13 18:11:12
Done.
|
this.__defineGetter__('value', GetValue); |
this.__defineGetter__('verbatim', GetVerbatim); |
this.__defineGetter__('selectionStart', GetSelectionStart); |
@@ -24,12 +31,31 @@ if (!chrome.searchBox) { |
this.__defineGetter__('y', GetY); |
this.__defineGetter__('width', GetWidth); |
this.__defineGetter__('height', GetHeight); |
+ this.__defineGetter__('nativeSuggestions', GetAutocompleteResults); |
+ this.__defineGetter__('keyCode', GetKeyCode); |
this.setSuggestions = function(text) { |
SetSuggestions(text); |
}; |
+ this.setAutocompleteText = function(text, behavior) { |
+ SetSuggestionInline(text, behavior); |
+ }; |
+ this.setRestrictedAutocompleteText = function(resultId, behavior) { |
+ SetAutocompleteResultInline(resultId, behavior); |
+ }; |
+ this.setValue = function(text, type) { |
+ SetSuggestionReplace(text, type); |
+ }; |
+ this.setRestrictedValue = function(resultId, behavior) { |
+ SetAutocompleteResultReplace(resultId, behavior); |
+ }; |
+ this.setNonNativeDropdownHeight = function(height) { |
+ SetNonNativeDropdownHeight(height); |
+ }; |
this.onchange = null; |
this.onsubmit = null; |
this.oncancel = null; |
this.onresize = null; |
+ this.onautocompleteresults = null; |
+ this.onkeypress = null; |
}; |
} |