The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.webkit; |
| 18 | |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 19 | import android.annotation.Nullable; |
Ignacio Solla | 451e338 | 2014-11-10 10:35:54 +0000 | [diff] [blame] | 20 | import android.annotation.SystemApi; |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 21 | import android.content.Intent; |
Derek Sollenberger | 7ab3d67 | 2011-06-01 14:45:05 -0400 | [diff] [blame] | 22 | import android.content.pm.ActivityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 23 | import android.graphics.Bitmap; |
Leon Scroggins | 70ca3c2 | 2009-10-02 15:58:55 -0400 | [diff] [blame] | 24 | import android.net.Uri; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | import android.os.Message; |
Andrei Popescu | 6fa2958 | 2009-06-19 14:54:09 +0100 | [diff] [blame] | 26 | import android.view.View; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 27 | |
| 28 | public class WebChromeClient { |
| 29 | |
| 30 | /** |
| 31 | * Tell the host application the current progress of loading a page. |
| 32 | * @param view The WebView that initiated the callback. |
| 33 | * @param newProgress Current page loading progress, represented by |
| 34 | * an integer between 0 and 100. |
| 35 | */ |
| 36 | public void onProgressChanged(WebView view, int newProgress) {} |
| 37 | |
| 38 | /** |
| 39 | * Notify the host application of a change in the document title. |
| 40 | * @param view The WebView that initiated the callback. |
| 41 | * @param title A String containing the new title of the document. |
| 42 | */ |
| 43 | public void onReceivedTitle(WebView view, String title) {} |
| 44 | |
| 45 | /** |
| 46 | * Notify the host application of a new favicon for the current page. |
| 47 | * @param view The WebView that initiated the callback. |
| 48 | * @param icon A Bitmap containing the favicon for the current page. |
| 49 | */ |
| 50 | public void onReceivedIcon(WebView view, Bitmap icon) {} |
| 51 | |
| 52 | /** |
Patrick Scott | 2ba1262 | 2009-08-04 13:20:05 -0400 | [diff] [blame] | 53 | * Notify the host application of the url for an apple-touch-icon. |
| 54 | * @param view The WebView that initiated the callback. |
| 55 | * @param url The icon url. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 56 | * @param precomposed {@code true} if the url is for a precomposed touch icon. |
Patrick Scott | 2ba1262 | 2009-08-04 13:20:05 -0400 | [diff] [blame] | 57 | */ |
Patrick Scott | d58ccff | 2009-09-18 16:29:00 -0400 | [diff] [blame] | 58 | public void onReceivedTouchIconUrl(WebView view, String url, |
| 59 | boolean precomposed) {} |
Patrick Scott | 2ba1262 | 2009-08-04 13:20:05 -0400 | [diff] [blame] | 60 | |
| 61 | /** |
Andrei Popescu | 3c946a1a | 2009-07-03 08:20:53 +0100 | [diff] [blame] | 62 | * A callback interface used by the host application to notify |
| 63 | * the current page that its custom view has been dismissed. |
Andrei Popescu | 6fa2958 | 2009-06-19 14:54:09 +0100 | [diff] [blame] | 64 | */ |
Andrei Popescu | 3c946a1a | 2009-07-03 08:20:53 +0100 | [diff] [blame] | 65 | public interface CustomViewCallback { |
| 66 | /** |
| 67 | * Invoked when the host application dismisses the |
| 68 | * custom view. |
| 69 | */ |
| 70 | public void onCustomViewHidden(); |
| 71 | } |
| 72 | |
| 73 | /** |
Nate Fischer | aaaa660 | 2019-10-24 20:35:54 -0700 | [diff] [blame] | 74 | * Notify the host application that the current page has entered full screen mode. After this |
| 75 | * call, web content will no longer be rendered in the WebView, but will instead be rendered |
| 76 | * in {@code view}. The host application should add this View to a Window which is configured |
| 77 | * with {@link android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN} flag in order to |
| 78 | * actually display this web content full screen. |
| 79 | * |
| 80 | * <p>The application may explicitly exit fullscreen mode by invoking {@code callback} (ex. when |
| 81 | * the user presses the back button). However, this is generally not necessary as the web page |
| 82 | * will often show its own UI to close out of fullscreen. Regardless of how the WebView exits |
| 83 | * fullscreen mode, WebView will invoke {@link #onHideCustomView()}, signaling for the |
| 84 | * application to remove the custom View. |
| 85 | * |
| 86 | * <p>If this method is not overridden, WebView will report to the web page it does not support |
| 87 | * fullscreen mode and will not honor the web page's request to run in fullscreen mode. |
| 88 | * |
| 89 | * <p class="note"><b>Note:</b> if overriding this method, the application must also override |
| 90 | * {@link #onHideCustomView()}. |
| 91 | * |
Andrei Popescu | 3c946a1a | 2009-07-03 08:20:53 +0100 | [diff] [blame] | 92 | * @param view is the View object to be shown. |
Ignacio Solla | 7a4e18f | 2014-12-29 12:21:52 +0000 | [diff] [blame] | 93 | * @param callback invoke this callback to request the page to exit |
| 94 | * full screen mode. |
Andrei Popescu | 3c946a1a | 2009-07-03 08:20:53 +0100 | [diff] [blame] | 95 | */ |
| 96 | public void onShowCustomView(View view, CustomViewCallback callback) {}; |
Andrei Popescu | 6fa2958 | 2009-06-19 14:54:09 +0100 | [diff] [blame] | 97 | |
| 98 | /** |
| 99 | * Notify the host application that the current page would |
Derek Sollenberger | 7ab3d67 | 2011-06-01 14:45:05 -0400 | [diff] [blame] | 100 | * like to show a custom View in a particular orientation. |
| 101 | * @param view is the View object to be shown. |
| 102 | * @param requestedOrientation An orientation constant as used in |
| 103 | * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. |
| 104 | * @param callback is the callback to be invoked if and when the view |
| 105 | * is dismissed. |
Kristian Monsen | 0e0b2da | 2013-04-10 13:43:43 -0700 | [diff] [blame] | 106 | * @deprecated This method supports the obsolete plugin mechanism, |
| 107 | * and will not be invoked in future |
Derek Sollenberger | 7ab3d67 | 2011-06-01 14:45:05 -0400 | [diff] [blame] | 108 | */ |
Kristian Monsen | 0e0b2da | 2013-04-10 13:43:43 -0700 | [diff] [blame] | 109 | @Deprecated |
Derek Sollenberger | 7ab3d67 | 2011-06-01 14:45:05 -0400 | [diff] [blame] | 110 | public void onShowCustomView(View view, int requestedOrientation, |
| 111 | CustomViewCallback callback) {}; |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 112 | |
Derek Sollenberger | 7ab3d67 | 2011-06-01 14:45:05 -0400 | [diff] [blame] | 113 | /** |
Nate Fischer | aaaa660 | 2019-10-24 20:35:54 -0700 | [diff] [blame] | 114 | * Notify the host application that the current page has exited full screen mode. The host |
| 115 | * application must hide the custom View (the View which was previously passed to {@link |
| 116 | * #onShowCustomView(View, CustomViewCallback) onShowCustomView()}). After this call, web |
| 117 | * content will render in the original WebView again. |
| 118 | * |
| 119 | * <p class="note"><b>Note:</b> if overriding this method, the application must also override |
| 120 | * {@link #onShowCustomView(View, CustomViewCallback) onShowCustomView()}. |
Andrei Popescu | 6fa2958 | 2009-06-19 14:54:09 +0100 | [diff] [blame] | 121 | */ |
| 122 | public void onHideCustomView() {} |
| 123 | |
| 124 | /** |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 125 | * Request the host application to create a new window. If the host |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 126 | * application chooses to honor this request, it should return {@code true} from |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 127 | * this method, create a new WebView to host the window, insert it into the |
| 128 | * View system and send the supplied resultMsg message to its target with |
| 129 | * the new WebView as an argument. If the host application chooses not to |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 130 | * honor the request, it should return {@code false} from this method. The default |
| 131 | * implementation of this method does nothing and hence returns {@code false}. |
Torne (Richard Coles) | 97bf0be | 2018-05-16 10:51:56 -0400 | [diff] [blame] | 132 | * <p> |
| 133 | * Applications should typically not allow windows to be created when the |
| 134 | * {@code isUserGesture} flag is false, as this may be an unwanted popup. |
| 135 | * <p> |
| 136 | * Applications should be careful how they display the new window: don't simply |
| 137 | * overlay it over the existing WebView as this may mislead the user about which |
| 138 | * site they are viewing. If your application displays the URL of the main page, |
| 139 | * make sure to also display the URL of the new window in a similar fashion. If |
| 140 | * your application does not display URLs, consider disallowing the creation of |
| 141 | * new windows entirely. |
| 142 | * <p class="note"><b>Note:</b> There is no trustworthy way to tell which page |
| 143 | * requested the new window: the request might originate from a third-party iframe |
| 144 | * inside the WebView. |
| 145 | * |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 146 | * @param view The WebView from which the request for a new window |
| 147 | * originated. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 148 | * @param isDialog {@code true} if the new window should be a dialog, rather than |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 149 | * a full-size window. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 150 | * @param isUserGesture {@code true} if the request was initiated by a user gesture, |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 151 | * such as the user clicking a link. |
| 152 | * @param resultMsg The message to send when once a new WebView has been |
| 153 | * created. resultMsg.obj is a |
Steve Block | b22a69f | 2011-10-17 11:55:37 +0100 | [diff] [blame] | 154 | * {@link WebView.WebViewTransport} object. This should be |
| 155 | * used to transport the new WebView, by calling |
| 156 | * {@link WebView.WebViewTransport#setWebView(WebView) |
| 157 | * WebView.WebViewTransport.setWebView(WebView)}. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 158 | * @return This method should return {@code true} if the host application will |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 159 | * create a new window, in which case resultMsg should be sent to |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 160 | * its target. Otherwise, this method should return {@code false}. Returning |
| 161 | * {@code false} from this method but also sending resultMsg will result in |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 162 | * undefined behavior. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 163 | */ |
Steve Block | 89e00a9 | 2011-08-03 15:24:43 +0100 | [diff] [blame] | 164 | public boolean onCreateWindow(WebView view, boolean isDialog, |
| 165 | boolean isUserGesture, Message resultMsg) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | return false; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Request display and focus for this WebView. This may happen due to |
| 171 | * another WebView opening a link in this WebView and requesting that this |
| 172 | * WebView be displayed. |
| 173 | * @param view The WebView that needs to be focused. |
| 174 | */ |
| 175 | public void onRequestFocus(WebView view) {} |
| 176 | |
| 177 | /** |
| 178 | * Notify the host application to close the given WebView and remove it |
| 179 | * from the view system if necessary. At this point, WebCore has stopped |
| 180 | * any loading in this window and has removed any cross-scripting ability |
| 181 | * in javascript. |
Torne (Richard Coles) | 97bf0be | 2018-05-16 10:51:56 -0400 | [diff] [blame] | 182 | * <p> |
| 183 | * As with {@link #onCreateWindow}, the application should ensure that any |
| 184 | * URL or security indicator displayed is updated so that the user can tell |
| 185 | * that the page they were interacting with has been closed. |
| 186 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 187 | * @param window The WebView that needs to be closed. |
| 188 | */ |
| 189 | public void onCloseWindow(WebView window) {} |
| 190 | |
| 191 | /** |
Changwan Ryu | 31e2db9 | 2020-04-14 14:15:28 -0700 | [diff] [blame] | 192 | * Notify the host application that the web page wants to display a |
| 193 | * JavaScript {@code alert()} dialog. |
| 194 | * <p>The default behavior if this method returns {@code false} or is not |
| 195 | * overridden is to show a dialog containing the alert message and suspend |
| 196 | * JavaScript execution until the dialog is dismissed. |
| 197 | * <p>To show a custom dialog, the app should return {@code true} from this |
| 198 | * method, in which case the default dialog will not be shown and JavaScript |
| 199 | * execution will be suspended. The app should call |
| 200 | * {@code JsResult.confirm()} when the custom dialog is dismissed such that |
| 201 | * JavaScript execution can be resumed. |
| 202 | * <p>To suppress the dialog and allow JavaScript execution to |
| 203 | * continue, call {@code JsResult.confirm()} immediately and then return |
| 204 | * {@code true}. |
| 205 | * <p>Note that if the {@link WebChromeClient} is {@code null}, the default |
| 206 | * dialog will be suppressed and Javascript execution will continue |
| 207 | * immediately. |
| 208 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 209 | * @param view The WebView that initiated the callback. |
| 210 | * @param url The url of the page requesting the dialog. |
| 211 | * @param message Message to be displayed in the window. |
Changwan Ryu | 31e2db9 | 2020-04-14 14:15:28 -0700 | [diff] [blame] | 212 | * @param result A JsResult to confirm that the user closed the window. |
| 213 | * @return boolean {@code true} if the request is handled or ignored. |
| 214 | * {@code false} if WebView needs to show the default dialog. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 215 | */ |
| 216 | public boolean onJsAlert(WebView view, String url, String message, |
| 217 | JsResult result) { |
| 218 | return false; |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Tell the client to display a confirm dialog to the user. If the client |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 223 | * returns {@code true}, WebView will assume that the client will handle the |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 224 | * confirm dialog and call the appropriate JsResult method. If the |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 225 | * client returns false, a default value of {@code false} will be returned to |
| 226 | * javascript. The default behavior is to return {@code false}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 227 | * @param view The WebView that initiated the callback. |
| 228 | * @param url The url of the page requesting the dialog. |
| 229 | * @param message Message to be displayed in the window. |
| 230 | * @param result A JsResult used to send the user's response to |
| 231 | * javascript. |
| 232 | * @return boolean Whether the client will handle the confirm dialog. |
| 233 | */ |
| 234 | public boolean onJsConfirm(WebView view, String url, String message, |
| 235 | JsResult result) { |
| 236 | return false; |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Tell the client to display a prompt dialog to the user. If the client |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 241 | * returns {@code true}, WebView will assume that the client will handle the |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 242 | * prompt dialog and call the appropriate JsPromptResult method. If the |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 243 | * client returns false, a default value of {@code false} will be returned to to |
| 244 | * javascript. The default behavior is to return {@code false}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 245 | * @param view The WebView that initiated the callback. |
| 246 | * @param url The url of the page requesting the dialog. |
| 247 | * @param message Message to be displayed in the window. |
| 248 | * @param defaultValue The default value displayed in the prompt dialog. |
| 249 | * @param result A JsPromptResult used to send the user's reponse to |
| 250 | * javascript. |
| 251 | * @return boolean Whether the client will handle the prompt dialog. |
| 252 | */ |
| 253 | public boolean onJsPrompt(WebView view, String url, String message, |
| 254 | String defaultValue, JsPromptResult result) { |
| 255 | return false; |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Tell the client to display a dialog to confirm navigation away from the |
| 260 | * current page. This is the result of the onbeforeunload javascript event. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 261 | * If the client returns {@code true}, WebView will assume that the client will |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 262 | * handle the confirm dialog and call the appropriate JsResult method. If |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 263 | * the client returns {@code false}, a default value of {@code true} will be returned to |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 264 | * javascript to accept navigation away from the current page. The default |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 265 | * behavior is to return {@code false}. Setting the JsResult to {@code true} will navigate |
| 266 | * away from the current page, {@code false} will cancel the navigation. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 267 | * @param view The WebView that initiated the callback. |
| 268 | * @param url The url of the page requesting the dialog. |
| 269 | * @param message Message to be displayed in the window. |
| 270 | * @param result A JsResult used to send the user's response to |
| 271 | * javascript. |
| 272 | * @return boolean Whether the client will handle the confirm dialog. |
| 273 | */ |
| 274 | public boolean onJsBeforeUnload(WebView view, String url, String message, |
| 275 | JsResult result) { |
| 276 | return false; |
| 277 | } |
Ben Murdoch | 7df1985 | 2009-04-22 13:07:58 +0100 | [diff] [blame] | 278 | |
| 279 | /** |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 280 | * Tell the client that the quota has been exceeded for the Web SQL Database |
| 281 | * API for a particular origin and request a new quota. The client must |
| 282 | * respond by invoking the |
| 283 | * {@link WebStorage.QuotaUpdater#updateQuota(long) updateQuota(long)} |
| 284 | * method of the supplied {@link WebStorage.QuotaUpdater} instance. The |
| 285 | * minimum value that can be set for the new quota is the current quota. The |
| 286 | * default implementation responds with the current quota, so the quota will |
| 287 | * not be increased. |
| 288 | * @param url The URL of the page that triggered the notification |
| 289 | * @param databaseIdentifier The identifier of the database where the quota |
| 290 | * was exceeded. |
| 291 | * @param quota The quota for the origin, in bytes |
| 292 | * @param estimatedDatabaseSize The estimated size of the offending |
| 293 | * database, in bytes |
| 294 | * @param totalQuota The total quota for all origins, in bytes |
| 295 | * @param quotaUpdater An instance of {@link WebStorage.QuotaUpdater} which |
| 296 | * must be used to inform the WebView of the new quota. |
Jonathan Dixon | 5545d08 | 2013-08-31 22:43:11 -0700 | [diff] [blame] | 297 | * @deprecated This method is no longer called; WebView now uses the HTML5 / JavaScript Quota |
| 298 | * Management API. |
Ben Murdoch | 7df1985 | 2009-04-22 13:07:58 +0100 | [diff] [blame] | 299 | */ |
Jonathan Dixon | 5545d08 | 2013-08-31 22:43:11 -0700 | [diff] [blame] | 300 | @Deprecated |
Ben Murdoch | 7df1985 | 2009-04-22 13:07:58 +0100 | [diff] [blame] | 301 | public void onExceededDatabaseQuota(String url, String databaseIdentifier, |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 302 | long quota, long estimatedDatabaseSize, long totalQuota, |
| 303 | WebStorage.QuotaUpdater quotaUpdater) { |
Ben Murdoch | 7df1985 | 2009-04-22 13:07:58 +0100 | [diff] [blame] | 304 | // This default implementation passes the current quota back to WebCore. |
| 305 | // WebCore will interpret this that new quota was declined. |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 306 | quotaUpdater.updateQuota(quota); |
Ben Murdoch | 7df1985 | 2009-04-22 13:07:58 +0100 | [diff] [blame] | 307 | } |
Guang Zhu | 10e4d20 | 2009-05-11 18:09:51 -0700 | [diff] [blame] | 308 | |
Andrei Popescu | 59e2ad9 | 2009-07-28 13:38:06 +0100 | [diff] [blame] | 309 | /** |
Selim Gurun | c86bec9 | 2012-06-28 16:47:19 -0700 | [diff] [blame] | 310 | * Notify the host application that the Application Cache has reached the |
| 311 | * maximum size. The client must respond by invoking the |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 312 | * {@link WebStorage.QuotaUpdater#updateQuota(long) updateQuota(long)} |
| 313 | * method of the supplied {@link WebStorage.QuotaUpdater} instance. The |
| 314 | * minimum value that can be set for the new quota is the current quota. The |
| 315 | * default implementation responds with the current quota, so the quota will |
| 316 | * not be increased. |
| 317 | * @param requiredStorage The amount of storage required by the Application |
| 318 | * Cache operation that triggered this notification, |
| 319 | * in bytes. |
Selim Gurun | c86bec9 | 2012-06-28 16:47:19 -0700 | [diff] [blame] | 320 | * @param quota the current maximum Application Cache size, in bytes |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 321 | * @param quotaUpdater An instance of {@link WebStorage.QuotaUpdater} which |
| 322 | * must be used to inform the WebView of the new quota. |
Jonathan Dixon | 5545d08 | 2013-08-31 22:43:11 -0700 | [diff] [blame] | 323 | * @deprecated This method is no longer called; WebView now uses the HTML5 / JavaScript Quota |
| 324 | * Management API. |
Andrei Popescu | 59e2ad9 | 2009-07-28 13:38:06 +0100 | [diff] [blame] | 325 | */ |
Jonathan Dixon | 5545d08 | 2013-08-31 22:43:11 -0700 | [diff] [blame] | 326 | @Deprecated |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 327 | public void onReachedMaxAppCacheSize(long requiredStorage, long quota, |
Andrei Popescu | 59e2ad9 | 2009-07-28 13:38:06 +0100 | [diff] [blame] | 328 | WebStorage.QuotaUpdater quotaUpdater) { |
Steve Block | 285ddfc | 2012-03-28 12:46:02 +0100 | [diff] [blame] | 329 | quotaUpdater.updateQuota(quota); |
Andrei Popescu | 59e2ad9 | 2009-07-28 13:38:06 +0100 | [diff] [blame] | 330 | } |
| 331 | |
Guang Zhu | 81e4143 | 2009-05-08 16:09:55 -0700 | [diff] [blame] | 332 | /** |
Steve Block | 7351adf | 2011-11-30 15:52:32 +0000 | [diff] [blame] | 333 | * Notify the host application that web content from the specified origin |
| 334 | * is attempting to use the Geolocation API, but no permission state is |
| 335 | * currently set for that origin. The host application should invoke the |
| 336 | * specified callback with the desired permission state. See |
| 337 | * {@link GeolocationPermissions} for details. |
Tim Volodine | b0e9798 | 2016-04-27 14:14:09 +0100 | [diff] [blame] | 338 | * |
| 339 | * <p>Note that for applications targeting Android N and later SDKs |
| 340 | * (API level > {@link android.os.Build.VERSION_CODES#M}) |
| 341 | * this method is only called for requests originating from secure |
| 342 | * origins such as https. On non-secure origins geolocation requests |
Nate Fischer | f02f846 | 2017-09-11 15:16:33 -0700 | [diff] [blame] | 343 | * are automatically denied. |
Tim Volodine | b0e9798 | 2016-04-27 14:14:09 +0100 | [diff] [blame] | 344 | * |
Steve Block | 7351adf | 2011-11-30 15:52:32 +0000 | [diff] [blame] | 345 | * @param origin The origin of the web content attempting to use the |
| 346 | * Geolocation API. |
| 347 | * @param callback The callback to use to set the permission state for the |
| 348 | * origin. |
Steve Block | 4faee09 | 2009-07-28 18:20:50 +0100 | [diff] [blame] | 349 | */ |
| 350 | public void onGeolocationPermissionsShowPrompt(String origin, |
Tim Volodine | 0bb7d2e | 2015-07-23 17:16:16 +0000 | [diff] [blame] | 351 | GeolocationPermissions.Callback callback) {} |
Steve Block | 4faee09 | 2009-07-28 18:20:50 +0100 | [diff] [blame] | 352 | |
| 353 | /** |
Steve Block | 7351adf | 2011-11-30 15:52:32 +0000 | [diff] [blame] | 354 | * Notify the host application that a request for Geolocation permissions, |
| 355 | * made with a previous call to |
| 356 | * {@link #onGeolocationPermissionsShowPrompt(String,GeolocationPermissions.Callback) onGeolocationPermissionsShowPrompt()} |
| 357 | * has been canceled. Any related UI should therefore be hidden. |
Steve Block | 4faee09 | 2009-07-28 18:20:50 +0100 | [diff] [blame] | 358 | */ |
| 359 | public void onGeolocationPermissionsHidePrompt() {} |
| 360 | |
| 361 | /** |
Tao Bai | 4c22b54 | 2014-04-15 18:04:49 +0000 | [diff] [blame] | 362 | * Notify the host application that web content is requesting permission to |
| 363 | * access the specified resources and the permission currently isn't granted |
Tao Bai | 2871feb | 2014-07-16 13:54:15 -0700 | [diff] [blame] | 364 | * or denied. The host application must invoke {@link PermissionRequest#grant(String[])} |
Tao Bai | 4c22b54 | 2014-04-15 18:04:49 +0000 | [diff] [blame] | 365 | * or {@link PermissionRequest#deny()}. |
| 366 | * |
| 367 | * If this method isn't overridden, the permission is denied. |
| 368 | * |
| 369 | * @param request the PermissionRequest from current web content. |
Tao Bai | 4c22b54 | 2014-04-15 18:04:49 +0000 | [diff] [blame] | 370 | */ |
| 371 | public void onPermissionRequest(PermissionRequest request) { |
| 372 | request.deny(); |
| 373 | } |
| 374 | |
| 375 | /** |
| 376 | * Notify the host application that the given permission request |
| 377 | * has been canceled. Any related UI should therefore be hidden. |
| 378 | * |
Tao Bai | fa1fd2c | 2014-04-30 13:31:34 -0700 | [diff] [blame] | 379 | * @param request the PermissionRequest that needs be canceled. |
Tao Bai | 4c22b54 | 2014-04-15 18:04:49 +0000 | [diff] [blame] | 380 | */ |
| 381 | public void onPermissionRequestCanceled(PermissionRequest request) {} |
| 382 | |
| 383 | /** |
Guang Zhu | 81e4143 | 2009-05-08 16:09:55 -0700 | [diff] [blame] | 384 | * Tell the client that a JavaScript execution timeout has occured. And the |
| 385 | * client may decide whether or not to interrupt the execution. If the |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 386 | * client returns {@code true}, the JavaScript will be interrupted. If the client |
| 387 | * returns {@code false}, the execution will continue. Note that in the case of |
Guang Zhu | 81e4143 | 2009-05-08 16:09:55 -0700 | [diff] [blame] | 388 | * continuing execution, the timeout counter will be reset, and the callback |
| 389 | * will continue to occur if the script does not finish at the next check |
| 390 | * point. |
| 391 | * @return boolean Whether the JavaScript execution should be interrupted. |
Ben Murdoch | 1bd37b1 | 2012-05-28 12:42:39 +0100 | [diff] [blame] | 392 | * @deprecated This method is no longer supported and will not be invoked. |
Guang Zhu | 81e4143 | 2009-05-08 16:09:55 -0700 | [diff] [blame] | 393 | */ |
Ben Murdoch | 1bd37b1 | 2012-05-28 12:42:39 +0100 | [diff] [blame] | 394 | // This method was only called when using the JSC javascript engine. V8 became |
| 395 | // the default JS engine with Froyo and support for building with JSC was |
| 396 | // removed in b/5495373. V8 does not have a mechanism for making a callback such |
| 397 | // as this. |
Aurimas Liutikas | 514c5ef | 2016-05-24 15:22:55 -0700 | [diff] [blame] | 398 | @Deprecated |
Guang Zhu | 81e4143 | 2009-05-08 16:09:55 -0700 | [diff] [blame] | 399 | public boolean onJsTimeout() { |
| 400 | return true; |
| 401 | } |
Ben Murdoch | 6262ae5 | 2009-04-17 13:21:53 +0100 | [diff] [blame] | 402 | |
| 403 | /** |
Ben Murdoch | 7caaeec | 2009-11-19 18:14:53 +0000 | [diff] [blame] | 404 | * Report a JavaScript error message to the host application. The ChromeClient |
| 405 | * should override this to process the log message as they see fit. |
Ben Murdoch | 6262ae5 | 2009-04-17 13:21:53 +0100 | [diff] [blame] | 406 | * @param message The error message to report. |
| 407 | * @param lineNumber The line number of the error. |
| 408 | * @param sourceID The name of the source file that caused the error. |
Ben Murdoch | 3141e0a | 2010-01-28 15:06:32 +0000 | [diff] [blame] | 409 | * @deprecated Use {@link #onConsoleMessage(ConsoleMessage) onConsoleMessage(ConsoleMessage)} |
| 410 | * instead. |
Ben Murdoch | 6262ae5 | 2009-04-17 13:21:53 +0100 | [diff] [blame] | 411 | */ |
Ben Murdoch | 3141e0a | 2010-01-28 15:06:32 +0000 | [diff] [blame] | 412 | @Deprecated |
| 413 | public void onConsoleMessage(String message, int lineNumber, String sourceID) { } |
| 414 | |
| 415 | /** |
| 416 | * Report a JavaScript console message to the host application. The ChromeClient |
| 417 | * should override this to process the log message as they see fit. |
| 418 | * @param consoleMessage Object containing details of the console message. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 419 | * @return {@code true} if the message is handled by the client. |
Ben Murdoch | 3141e0a | 2010-01-28 15:06:32 +0000 | [diff] [blame] | 420 | */ |
| 421 | public boolean onConsoleMessage(ConsoleMessage consoleMessage) { |
| 422 | // Call the old version of this function for backwards compatability. |
| 423 | onConsoleMessage(consoleMessage.message(), consoleMessage.lineNumber(), |
| 424 | consoleMessage.sourceId()); |
| 425 | return false; |
| 426 | } |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 427 | |
| 428 | /** |
Ben Murdoch | f0c443d | 2009-11-19 16:43:58 +0000 | [diff] [blame] | 429 | * When not playing, video elements are represented by a 'poster' image. The |
| 430 | * image to use can be specified by the poster attribute of the video tag in |
| 431 | * HTML. If the attribute is absent, then a default poster will be used. This |
| 432 | * method allows the ChromeClient to provide that default image. |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 433 | * |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 434 | * @return Bitmap The image to use as a default poster, or {@code null} if no such image is |
Ben Murdoch | f0c443d | 2009-11-19 16:43:58 +0000 | [diff] [blame] | 435 | * available. |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 436 | */ |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 437 | @Nullable |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 438 | public Bitmap getDefaultVideoPoster() { |
| 439 | return null; |
| 440 | } |
| 441 | |
| 442 | /** |
Ignacio Solla | 7a4e18f | 2014-12-29 12:21:52 +0000 | [diff] [blame] | 443 | * Obtains a View to be displayed while buffering of full screen video is taking |
| 444 | * place. The host application can override this method to provide a View |
| 445 | * containing a spinner or similar. |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 446 | * |
Ben Murdoch | f0c443d | 2009-11-19 16:43:58 +0000 | [diff] [blame] | 447 | * @return View The View to be displayed whilst the video is loading. |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 448 | */ |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 449 | @Nullable |
Andrei Popescu | bf385d7 | 2009-09-18 18:59:52 +0100 | [diff] [blame] | 450 | public View getVideoLoadingProgressView() { |
| 451 | return null; |
| 452 | } |
Leon Clarke | 194e345 | 2009-09-28 11:42:12 +0100 | [diff] [blame] | 453 | |
| 454 | /** Obtains a list of all visited history items, used for link coloring |
Leon Clarke | 194e345 | 2009-09-28 11:42:12 +0100 | [diff] [blame] | 455 | */ |
| 456 | public void getVisitedHistory(ValueCallback<String[]> callback) { |
| 457 | } |
| 458 | |
Leon Scroggins | 70ca3c2 | 2009-10-02 15:58:55 -0400 | [diff] [blame] | 459 | /** |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 460 | * Tell the client to show a file chooser. |
| 461 | * |
| 462 | * This is called to handle HTML forms with 'file' input type, in response to the |
| 463 | * user pressing the "Select File" button. |
| 464 | * To cancel the request, call <code>filePathCallback.onReceiveValue(null)</code> and |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 465 | * return {@code true}. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 466 | * |
| 467 | * @param webView The WebView instance that is initiating the request. |
| 468 | * @param filePathCallback Invoke this callback to supply the list of paths to files to upload, |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 469 | * or {@code null} to cancel. Must only be called if the |
| 470 | * {@link #onShowFileChooser} implementation returns {@code true}. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 471 | * @param fileChooserParams Describes the mode of file chooser to be opened, and options to be |
| 472 | * used with it. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 473 | * @return {@code true} if filePathCallback will be invoked, {@code false} to use default |
| 474 | * handling. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 475 | * |
| 476 | * @see FileChooserParams |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 477 | */ |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 478 | public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 479 | FileChooserParams fileChooserParams) { |
| 480 | return false; |
| 481 | } |
| 482 | |
| 483 | /** |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 484 | * Parameters used in the {@link #onShowFileChooser} method. |
| 485 | */ |
| 486 | public static abstract class FileChooserParams { |
| 487 | /** Open single file. Requires that the file exists before allowing the user to pick it. */ |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 488 | public static final int MODE_OPEN = 0; |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 489 | /** Like Open but allows multiple files to be selected. */ |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 490 | public static final int MODE_OPEN_MULTIPLE = 1; |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 491 | /** Like Open but allows a folder to be selected. The implementation should enumerate |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 492 | all files selected by this operation. |
| 493 | This feature is not supported at the moment. |
| 494 | @hide */ |
| 495 | public static final int MODE_OPEN_FOLDER = 2; |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 496 | /** Allows picking a nonexistent file and saving it. */ |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 497 | public static final int MODE_SAVE = 3; |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 498 | |
| 499 | /** |
Tao Bai | e8df27a | 2014-09-02 14:09:49 -0700 | [diff] [blame] | 500 | * Parse the result returned by the file picker activity. This method should be used with |
| 501 | * {@link #createIntent}. Refer to {@link #createIntent} for how to use it. |
| 502 | * |
| 503 | * @param resultCode the integer result code returned by the file picker activity. |
| 504 | * @param data the intent returned by the file picker activity. |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 505 | * @return the Uris of selected file(s) or {@code null} if the resultCode indicates |
Tao Bai | e8df27a | 2014-09-02 14:09:49 -0700 | [diff] [blame] | 506 | * activity canceled or any other error. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 507 | */ |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 508 | @Nullable |
Tao Bai | e8df27a | 2014-09-02 14:09:49 -0700 | [diff] [blame] | 509 | public static Uri[] parseResult(int resultCode, Intent data) { |
| 510 | return WebViewFactory.getProvider().getStatics().parseFileChooserResult(resultCode, data); |
| 511 | } |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 512 | |
| 513 | /** |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 514 | * Returns file chooser mode. |
| 515 | */ |
| 516 | public abstract int getMode(); |
| 517 | |
| 518 | /** |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 519 | * Returns an array of acceptable MIME types. The returned MIME type |
| 520 | * could be partial such as audio/*. The array will be empty if no |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 521 | * acceptable types are specified. |
| 522 | */ |
| 523 | public abstract String[] getAcceptTypes(); |
| 524 | |
| 525 | /** |
| 526 | * Returns preference for a live media captured value (e.g. Camera, Microphone). |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 527 | * True indicates capture is enabled, {@code false} disabled. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 528 | * |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 529 | * Use <code>getAcceptTypes</code> to determine suitable capture devices. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 530 | */ |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 531 | public abstract boolean isCaptureEnabled(); |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 532 | |
| 533 | /** |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 534 | * Returns the title to use for this file selector. If {@code null} a default title should |
| 535 | * be used. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 536 | */ |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 537 | @Nullable |
Selim Gurun | 48f6c45 | 2014-07-18 16:23:46 -0700 | [diff] [blame] | 538 | public abstract CharSequence getTitle(); |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 539 | |
| 540 | /** |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 541 | * The file name of a default selection if specified, or {@code null}. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 542 | */ |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 543 | @Nullable |
Selim Gurun | 17d1adb | 2014-08-27 11:22:26 -0700 | [diff] [blame] | 544 | public abstract String getFilenameHint(); |
Tao Bai | e8df27a | 2014-09-02 14:09:49 -0700 | [diff] [blame] | 545 | |
| 546 | /** |
| 547 | * Creates an intent that would start a file picker for file selection. |
| 548 | * The Intent supports choosing files from simple file sources available |
| 549 | * on the device. Some advanced sources (for example, live media capture) |
| 550 | * may not be supported and applications wishing to support these sources |
| 551 | * or more advanced file operations should build their own Intent. |
| 552 | * |
Nate Fischer | 06fd060 | 2019-08-12 20:44:51 -0700 | [diff] [blame] | 553 | * <p>How to use: |
| 554 | * <ol> |
| 555 | * <li>Build an intent using {@link #createIntent}</li> |
| 556 | * <li>Fire the intent using {@link android.app.Activity#startActivityForResult}.</li> |
| 557 | * <li>Check for ActivityNotFoundException and take a user friendly action if thrown.</li> |
| 558 | * <li>Listen the result using {@link android.app.Activity#onActivityResult}</li> |
| 559 | * <li>Parse the result using {@link #parseResult} only if media capture was not |
| 560 | * requested.</li> |
| 561 | * <li>Send the result using filePathCallback of {@link |
| 562 | * WebChromeClient#onShowFileChooser}</li> |
| 563 | * </ol> |
Tao Bai | e8df27a | 2014-09-02 14:09:49 -0700 | [diff] [blame] | 564 | * |
| 565 | * @return an Intent that supports basic file chooser sources. |
| 566 | */ |
| 567 | public abstract Intent createIntent(); |
| 568 | } |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 569 | |
| 570 | /** |
Leon Scroggins | 70ca3c2 | 2009-10-02 15:58:55 -0400 | [diff] [blame] | 571 | * Tell the client to open a file chooser. |
| 572 | * @param uploadFile A ValueCallback to set the URI of the file to upload. |
Ben Murdoch | 4ae32f5 | 2010-05-18 14:30:39 +0100 | [diff] [blame] | 573 | * onReceiveValue must be called to wake up the thread.a |
| 574 | * @param acceptType The value of the 'accept' attribute of the input tag |
| 575 | * associated with this file picker. |
Ben Murdoch | be71692 | 2012-01-11 10:55:10 +0000 | [diff] [blame] | 576 | * @param capture The value of the 'capture' attribute of the input tag |
| 577 | * associated with this file picker. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 578 | * |
Nate Fischer | c4f8f89 | 2017-08-30 15:39:32 -0700 | [diff] [blame] | 579 | * @deprecated Use {@link #onShowFileChooser} instead. |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 580 | * @hide This method was not published in any SDK version. |
Leon Scroggins | 70ca3c2 | 2009-10-02 15:58:55 -0400 | [diff] [blame] | 581 | */ |
Ignacio Solla | 451e338 | 2014-11-10 10:35:54 +0000 | [diff] [blame] | 582 | @SystemApi |
Jonathan Dixon | 3a5cf38 | 2013-07-27 15:37:31 -0700 | [diff] [blame] | 583 | @Deprecated |
Ben Murdoch | be71692 | 2012-01-11 10:55:10 +0000 | [diff] [blame] | 584 | public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType, String capture) { |
Leon Scroggins | 70ca3c2 | 2009-10-02 15:58:55 -0400 | [diff] [blame] | 585 | uploadFile.onReceiveValue(null); |
| 586 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 587 | } |