diff options
| author | Mathew Inwood <mathewi@google.com> | 2011-07-08 17:26:46 +0100 |
|---|---|---|
| committer | Mathew Inwood <mathewi@google.com> | 2011-07-14 11:40:03 +0100 |
| commit | e7821cd607c8fb660034ae3d158a1b17ef575159 (patch) | |
| tree | f097840186a020f572a5774dcc117334dc822a0a /core/java/android/webkit/SearchBox.java | |
| parent | f7537bccb2b2ca2fa6c0205c4b24acd0836c0006 (diff) | |
SearchBox API changes, to know when calls succeeded.
Depends on change: I5af94c8df8f24dfafb02c4052381aa547c72684c
(due to SearchBox API change).
Change-Id: If283ecdfa62aecb1fa697b1a2cd43b771b908d72
Diffstat (limited to 'core/java/android/webkit/SearchBox.java')
| -rw-r--r-- | core/java/android/webkit/SearchBox.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/core/java/android/webkit/SearchBox.java b/core/java/android/webkit/SearchBox.java index 5075302fb936..6512c4bc685e 100644 --- a/core/java/android/webkit/SearchBox.java +++ b/core/java/android/webkit/SearchBox.java @@ -68,11 +68,15 @@ public interface SearchBox { * Notify the search page of any changes to the searchbox. Such as * a change in the typed query (onchange), the user commiting a given query * (onsubmit), or a change in size of a suggestions dropdown (onresize). + * + * @param listener an optional listener to notify of the success of the operation, + * indicating if the javascript function existed and could be called or not. + * It will be called on the UI thread. */ - void onchange(); - void onsubmit(); - void onresize(); - void oncancel(); + void onchange(SearchBoxListener listener); + void onsubmit(SearchBoxListener listener); + void onresize(SearchBoxListener listener); + void oncancel(SearchBoxListener listener); /** * Add and remove listeners to the given Searchbox. Listeners are notified @@ -91,8 +95,12 @@ public interface SearchBox { * Listeners (if any) will be called on the thread that created the * webview. */ - interface SearchBoxListener { - void onSuggestionsReceived(String query, List<String> suggestions); + public abstract class SearchBoxListener { + public void onSuggestionsReceived(String query, List<String> suggestions) {} + public void onChangeComplete(boolean called) {} + public void onSubmitComplete(boolean called) {} + public void onResizeComplete(boolean called) {} + public void onCancelComplete(boolean called) {} } interface IsSupportedCallback { |
