summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebChromeClient.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove WebView AppCache APIs.Torne (Richard Coles)2021-09-141-0/+2
| | | | | | | | | These are no-ops since WebView 95; remove them from the SDK to make it clear to apps that they're nonfunctional. Bug: 199287927 Test: atest CtsWebkitTestCases Change-Id: I498aff6f8a0c2901504d777f597dbf77f982cd3a
* webkit: add a note regarding FLAG_SECURE for default dialogsChangwan Ryu2020-06-011-0/+8
| | | | | | | | | | | | | Child windows do not inherit FLAG_SECURE from parent windows, and therefore, the default dialogs for JS callbacks do not have this flag even when the app window has it. This CL adds a note warning about this behavior to mitigate the potential vulnerability. Bug: 120086187 Test: m -j offline-sdk-docs seems not broken Change-Id: I12f12befd1f303d26ebc866f4817f5184279caeb
* webkit: Update documentation for onJsBeforeUnload callbackChangwan Ryu2020-05-271-18/+32
| | | | | | | | | | Fix documentation to clearly indicate that the default behavior is to show WebView's own default dialog, and also describe the default behavior more clearly and how to customize it. Bug: 154014645 Test: m -j offline-sdk-docs seems not broken Change-Id: I7d1e10c5d406ed739fb3963b9099791cfce95063
* webkit: Update documentation for onJsConfirm, onJsPrompt callbacksChangwan Ryu2020-05-191-12/+44
| | | | | | | | | | | | | | Fix documentation to clearly indicate that the default behavior is to show WebView's own default dialog, and also describing clearly default dialog behavior and how to customize it. Note that onJsBeforeUnload is not updated at the moment as I could not find a way to reproduce it. Bug: 154014645 Test: m -j offline-sdk-docs seems not broken Change-Id: I5ee09ea35340eb8d17353eda1786dcebcff4a29e
* webkit: Update documentation for onJsAlert callback methodChangwan Ryu2020-05-131-5/+20
| | | | | | | | | | | Fix documentation to clearly indicate that the default behavior is to show WebView's own default dialog. Also, change some wording to avoid confusion. Bug: 154014645 Test: m -j offline-sdk-docs seems unbroken Change-Id: I3f6676094e5472aa99bb014cf2b489f59133d094
* WebView: clarify docs for onShowCustomViewNate Fischer2019-10-281-9/+25
| | | | | | | | | | | | | No change to logic, only docs. This clarifies the docs for onShowCustomView. This @links to FLAG_FULLSCREEN, reminds the developer they must override both onShowCustomView and onHideCustomView, and provides guidance for CustomViewCallback. Bug: 143247282 Test: make -j4 docs Change-Id: I64de3723674da5c138438921cc8232c4bf2a3d98
* WebView: prettyprint docsNate Fischer2019-08-131-9/+11
| | | | | | | | | | | No change to logic, only docs. Use class=prettyprint so docs are syntax highlighted. This also fixes a section which should have been an ordered list but abused <pre> instead. Bug: 125526827 Test: make -j4 docs Change-Id: Iac780ace066be35620d5121b1977df404eaf18c1
* Update security-related WebView documentation.Torne (Richard Coles)2018-05-221-0/+19
| | | | | | | | | | Add a number of notes for application developers related to using the WebView securely. Change-Id: I7dba78d35bc36dd719ed0629224fe3a1d197f52c Bug: 80095507, 79169416, 79169397, 79170052, 79170398 Fixes: 78941917 Test: m offline-sdk-docs
* Merge "WebView: add @Nullable and @NonNull annotations"TreeHugger Robot2017-09-261-2/+8
|\
| * WebView: add @Nullable and @NonNull annotationsNate Fischer2017-09-211-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds @Nullable and @NonNull annotations where the docs previously stated this. This change should be safe, since we already disallowed null values for the @NonNull parameters via documentation. I verified that documentation changes for APIs which previously did not mention null-ness in @param or @return Javadocs (if the API already mentioned it in these spots, then DroidDoc prefers the hand-written description). This also fixes various lint errors. Bug: 65465498 Test: make update-api and manually verify docs Change-Id: I4751508d0e72be8ddfc3d6b601db8c307c9df60e
* | Merge "WebView: remove "</p>" tags from docs"Nate Fischer2017-09-141-1/+1
|\ \ | |/ |/|
| * WebView: remove "</p>" tags from docsNate Fischer2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docs change only, no change to logic. This removes closing "</p>" tags from WebView API docs, as per API guidelines. This also adds a trailing newline to a <pre> block for consistency. Other than the modified <pre> block, this has no reader-visible change, it merely complies with best practices from Android API guidelines. Bug: 65381884 Test: make docs (and manually compare before/after for differences) Change-Id: I2f911a43b88a8897d9d1b5c7945360580491883d
* | WebView: wrap Java literals with {@code}Nate Fischer2017-09-051-33/+34
|/ | | | | | | | | | | | | | | | Docs change only. This wraps some Java literals (true, false, null) with {@code} blocks, as per Android API guidelines. This also addresses other presubmit errors: * fix lines that have become too long * fix broken import order and unused imports Bug: 65213517 Test: make docs (and manually verify things look better) Change-Id: Idc7fe28d40bea7bd1edcad539b75fa9c689b8d46
* WebView: fix broken references to #onShowFileChooserNate Fischer2017-08-301-2/+2
| | | | | | | | | | | | WebChromeClient#onShowFileChooser was incorrectly referred to as "showFileChooser" in two locations. Now these locations use the correct name and the spot using "<code>" has been fixed to use "{@link}". This also fixes a grammar error in the docs. Bug: 65213653 Test: make docs (and manually verify the link works) Change-Id: I17ba8ac3f76371a8b8a12b998ce4c956b6237119
* Remove a couple of unused android.webkit methods.Gustav Sennton2017-07-201-11/+0
| | | | | | Test: build angler system image. Change-Id: I09d7f955bd86facca4e4c9fb8ecc243f70346978
* Add missing @Deprecated annotations.Aurimas Liutikas2016-05-241-0/+1
| | | | | | | Add missing @Deprecated annotations for methods with @deprecated tag in javadoc. Change-Id: I35b78ccb97832d86b914c21a300444ba29e33844
* [WebView] Add documentation regarding geolocation api on secure origins.Tim Volodine2016-04-291-0/+7
| | | | | | | | | | | Update to javadoc comments saying that for apps targeting N and up the geolocation api is only supported on secure origins. On non-secure origins requests to geolocation api are automatically denied without calling the corresponding WebChromeClient#onGeolocationPermissionsShowPrompt method. BUG: 28080869 Change-Id: I57726f7f3b3d38db0535f742b1f74c40c1f1ce8b
* Revert "Invoke geolocation permissions callback with denied state by default."Tim Volodine2015-07-231-7/+1
| | | | | | | | This reverts commit 954d1333c478d4dba6c9a0536510da4fd94c0622. The revert is due to apps calling super.onGeolocationPermissionsShowPrompt see b/22685046 Change-Id: I2a9f42b432a010828a0cafaee064480bb0f91cbe
* Invoke geolocation permissions callback with denied state by default.Tim Volodine2015-03-251-1/+7
| | | | | | | | | | | For apps that use WebView but don't override WebChromeClient.onGeolocationPermissionsShowPrompt the callback should be invoked with allow set to false by default. This ensures that the error handler callback in JavaScript is invoked in this case (with the "User denied Geolocation" error). Currently no callbacks are invoked at all by default (see http://crbug.com/470500). Change-Id: I49664906b8cfa6910106c8da1b21b99628adacfc
* [WebView] Improve documentation around full screen mode.Ignacio Solla2015-01-221-11/+13
| | | | | | | | | | | onShowCustomView and onHideCustomView are only used for full screen support so we make that more explicit now (perhaps we should consider rename and deprecate). In M40 the WebView will also support full screen for non <video> elements so we also consider that use case. Change-Id: Ie4e245defbdd3e53bff98ac73305dd5e5e46334c
* [WebView] Allow the WebView to be compiled against the system SDK.Ignacio Solla2014-11-121-0/+2
| | | | | BUG:18152150 Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
* Revise createIntent and parseResult API.Tao Bai2014-09-091-37/+32
| | | | | | | | | | | - Both are move to FileChooserParams, remove UploadHelper class. - createIntent only handls non-capture intents - parseResult is the static member of FileChooseParams and should be used with createIntent. BUG:17253647,16624450 Change-Id: I81cac7c1b739880db4e4c1f2b4612ed2ee87cb1b
* Address API FeedbackSelim Gurun2014-08-271-8/+11
| | | | | | | | | Bug: 17253647 This is Part I of API feedback. It does not address portions of the feedback that is still pending a response from API council. Change-Id: I6ae250c6455a5545912623aeb34332d564fffde7
* Address API reviewSelim Gurun2014-07-241-26/+65
| | | | | | | | | | | Bug: 16403458 Address API review. This change updates the FileChooser api. The largest change is, as requested by API council, providing a helper to reduce the code app developers need to implement. This change does not include the CookieManager changes that was requested. Change-Id: I30d75f36df6bc96d9842b63fdd25c4ff62aee5bb
* WebView permission changeTao Bai2014-07-231-1/+1
| | | | | | | | | | As requested by API council, the following were changed - Changed the PermissionRequest to abstract. - Used String for resources instead of long. - Also remove the WebView.preauthorizePermission() which we didn't think BUG: 15432556 Change-Id: I900a98b4e0288d2bcd8faf0bbcd84970600548a5
* Unhide the file APISelim Gurun2014-06-161-5/+1
| | | | | Bug: 6930981 Change-Id: I4818d5dff3cb05b38e4d8f9f817e4fcdeade7f00
* Add WebChromeClient.showFileChooserJonathan Dixon2014-06-101-2/+78
| | | | | | | | | | Bug: 6930981 This replaces the never-published openFileChooser, and is more future extensible. Currently hidden; will unhide once working end to end and tested. Change-Id: Ie66750be37e5b90e4a411cec76278369dc8dabe8
* Public WebView permission APITao Bai2014-05-061-3/+1
| | | | | BUG: 13699047 Change-Id: Ibcc8c0d4f1bba4365cb71c1991a0fcb1d7febb94
* Revert "Revert "Define new general permission APIs for webview.""Tao Bai2014-04-151-0/+24
| | | | | | This reverts commit e0a7b08d369e323f524251a44251c902122a6414. Change-Id: Ieba5a72524e43eb5e2fccb39647fd11e9d9494c8
* Revert "Define new general permission APIs for webview."Tao Bai2014-04-151-24/+0
| | | | | | This reverts commit 672b99c8f80177784053074d178fdea6750e82df. Change-Id: I486b313b8cd638d5e29e2f022bba99b570a9415f
* Define new general permission APIs for webview.Tao Bai2014-04-101-0/+24
| | | | | | | | This will give us ability to add new webview featrues which requires permission without changing API during the WebView autoupdate. Also deprecated geolocation permission related APIs. BUG: 13699047 Change-Id: I6a557e11eb26c6ca236d44e75600e0b265fd791c
* Update APIs for the Chromium WebViewJonathan Dixon2013-09-171-4/+6
| | | | | | | | | | Bug: 10361803 Bug: 8565831 Several obsolete APIs now deprecated. TEXT_AUTOSIZING can now be unhidden. Change-Id: Ib0afa4bb010f35816d3b9dd3695e8997f0ff0793
* Fix for bug 8589670: Marking a not called WebChromeClient as deprecated.Kristian Monsen2013-04-101-1/+6
| | | | | | This is just a documentation improvement, the method is not called anymore. Change-Id: I6f704f7f1a5eef5048b7bf2c52c0589bc8e99839
* Merge "Fix onReachedMaxAppCacheSize callback"Selim Gurun2012-07-101-3/+3
|\
| * Fix onReachedMaxAppCacheSize callbackSelim Gurun2012-07-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | Bug: 5869022 When appcache reached max size, a callback is triggered. The second parameter of this callback was returning the used Web SQL quota, which is a rather different concept then AppCache. Fix this to return max database size. Change-Id: Iee11f40aa9635eaa22e237d4ddfb98792c977497
* | Remove unused ENABLE_ANDROID_INSTALLABLE_WEB_APPSGeorge Mount2012-06-211-7/+0
|/ | | | | | | | Remove an unused #define and code associated with it. This will smooth a possible future webkit merge. WebKit change: I16d8c457a3f08996bc66401b241fe0db5a118975 Change-Id: Ibf046337cdabb9bee9cff8e3d77d9f69a59ecb15
* Deprecate WebChromeClient.onJsTimeoutBen Murdoch2012-05-281-0/+5
| | | | | | | | | | This method was only supported with the JSC JavaScript engine. V8 became the default JavaScript engine in Froyo and this method has not been invoked since. Support for building JSC was removed in b/5495373. Bug: 6295376 Change-Id: I3dbe83f375b88ebbbb713d3c3fa5a2fa323a0d45
* Merge "Clean up JavaDoc for WebStorage"Steve Block2012-04-161-22/+39
|\
| * Clean up JavaDoc for WebStorageSteve Block2012-04-131-22/+39
| | | | | | | | | | Bug: 5461416 Change-Id: Ice7a2ca1e346ae80f53b477d236ff8c20032cf2f
* | Add support for HTML Media Capture "capture" attribute.Ben Murdoch2012-04-131-1/+3
|/ | | | | | | | | | | | | | Plumb the value of the "capture" attribute through the framework down to the embedder. Requires a change in WebKit (I0a921be31fda79a43c05da4fe22d9c808d92709c) and Browser (I38dfe2df043fdba1388384dbd3b5370737eb38e5). Bug: 5771207 Change-Id: I494adc1274ca21ce8fe52a6c7b6b758217927e66
* Clean up JavaDoc for GeolocationPermissionsSteve Block2011-11-301-3/+13
| | | | | | | | | Much of the current JavaDoc for GeolocationPermissions exposes implementation details which are of no interest to a Java developer. Move these comments out of the JavaDoc and clean up the text. Bug: 5461416 Change-Id: I95a68fe15016fadc729d8d857fd69b2c927a5ea9
* Build fixSteve Block2011-10-171-4/+4
| | | | | | | Fix after https://android-git.corp.google.com/g/#/c/125775 Bug: 5461416 Change-Id: Ifee29b287c9fcd2a35b0b676db00ef2a4fc8c5a8
* Improve documentation for WebChromeClient.onCreateWindow()Steve Block2011-10-141-20/+26
| | | | | Bug: 5461416 Change-Id: I9beac56374fb3ce97da4b20fa5646b5b5f05bad9
* Add API to allow plugins to lock their orientation in full-screen mode.Derek Sollenberger2011-06-021-0/+13
| | | | | | | This CL has companion changes in the browser and webkit. bug: 3398386 Change-Id: I09eee11e3a22ba3ce0af67e2a068dc7331dc49c2
* Offer the user the option to configure an AutoFill profile.Ben Murdoch2010-11-231-0/+10
| | | | | | | | | | | When the user selects a form field that is part of a form that can be autofilled, inform the embedder that this is the case to give them the opportunity to configure a profile if they the user has not done so already. A Message is also provided to the embedder that when sent will trigger the form to be filled with the profile that the embedder set up. Change-Id: Ica995e5b1ed92a3ec3e356401b261740d9f90e57
* Move Find on page and Select ActionModes to framework.Leon Scroggins2010-09-011-17/+0
| | | | | | | | Bug: 2938052 Requires a change to packages/apps/Browser Change-Id: I1bb1a47610b06c4bb02ef08647c02cc1dcaddb15
* Cancel test selections when they start if the client hasn't overridden theLeon Clarke2010-07-191-2/+5
| | | | | | | selection behavior. http://b/issue?id=2847546 Change-Id: I0d8529add54b3dfbf0af239fda1b15edd7bd32e0
* Receive notification from native webcore that the page being viewedBen Murdoch2010-06-291-0/+7
| | | | | | | | | | | has marked itself as being an installable web app. Default implementation in the WebChromeClient does nothing. Requires an external/webkit change. b/2766917 Change-Id: I7aae1b097f866e3d1c6c6a7a31a55bb12ff6a441
* Refactor find and select dialogsCary Clark2010-06-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | In WebView: - Remove the select mode, so that while text is selected, the view may respond to scroll or zoom gestures. - Remove the getFindIsUp() method -- let the host application track if the dialog is visible. - Map long press to select text if the host application does not already intercept it. - Draw find 'extras' during zoom animation. - Draw select 'extras' during animation and scrolling as well. - Distinguish between selecting text and pressing a shift key (the shift key is still a possible select text shortcut) - Add more public (but hidden) interfaces: setUpSelect, selectAll, etc. In WebChromeClient, add interfaces to allow WebView to tell the host application that selection has started or finished. A long press on a part of the view that does not trigger a host context menu may start the selection (if text is underneath the press), and clicking the trackball or tapping away from the current selection may end the selection. Companion changes in external/webkit and packages/apps/Browser Change-Id: I81f549181249c38d8d4c10fd7064f513d11318fa http://b/262451
* Allow passing of accept types from WebCore to Java for the file picker.Ben Murdoch2010-05-211-2/+4
| | | | | | Requires a change in external/webkit and packages/apps/Browser. Change-Id: I0fe5f0edb00be0f329f07e42e84f88aced543d17