summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewProvider.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add dispatchRequestTranslation() in WebViewProvider." into sc-dev am: ↵Joanne Chung2021-05-121-0/+11
|\ | | | | | | | | | | | | | | 137a248c1f Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14327001 Change-Id: I13f7e08e0ab32920fd982fe4871862441dbd1947
| * Add dispatchRequestTranslation() in WebViewProvider.Joanne Chung2021-05-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change doesn't introduce a new API, the change is just pushing down an existing API from View that we are missing to add for the webview. We should also provide this method to allow webview provider to provide their implementation if needed. Bug: 186617107 Test: manual CTS-Coverage-Bug: 177960696 Change-Id: If75285b3aafdb1f2a3d7c307a90bb783edf029b5
* | [WebView] Add document for ViewDelegate#onApplyWindowInsetsShimi Zhang2021-05-071-0/+11
|/ | | | | | | | | Explaining when the method will return null and how that is handled. Bug: 180991400 Test: No logic change, current tests should pass. Change-Id: Iae0a383cf173b80f50ea2bba46a3d263bed8f512
* API feedback: Translation View API refinement.Joanne Chung2021-04-201-3/+3
| | | | | | | | | Bug: 178046780 Test: manual Test: atest android.translation.cts.UiTranslationManagerTest CTS-Coverage-Bug: 177960696 Change-Id: I557ca4b3b4e7324af12e81dd8b5ac8a04a17b6b8
* Bug fix: allow to create ViewTranslationRequest for virtual AutofillId.Joanne Chung2021-03-311-1/+0
| | | | | | | | | | | | | | 1. We provide virtual child list to View#onCreateTranslationRequests but we don't provide a method to allow developers to create ViewTranslationRequest for virtual AutofillId. Add a builder constructor to allow developer to use it for virtual AutofillId. 2. Fix some comments in ag/13982294(e1b23cd) Bug: 177789967 Test: manual on sample app Test: atest CtsTranslationTestCases Change-Id: I63e914b888b23cdb7a5169fc6931be93625ca8e4
* Add translation APIs for virtual views.Joanne Chung2021-03-291-0/+20
| | | | | | | | | Bug: 178046780 Test: manual Test: atest CtsTranslationTestCases CTS-Coverage-Bug: 177960696 Change-Id: I99caed0d42b3a164a25c2707eba7057c42c19140
* [WebView] Listen to window insets changeChangwan Ryu2020-06-251-0/+7
| | | | | | | | | | | | | | | | | | | | | Overriding these methods in preparation for notch and safe area implementation for WebView. A corresponding implementation for Chrome app does this: https://source.chromium.org/chromium/chromium/src/+/master:components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/InsetObserverView.java;l=179;drc=b17e62321db0f69a9131d3bb87ab9cef502a0eaf?originalUrl=https:%2F%2Fcs.chromium.org%2F An alternative would be to call View#setOnApplyWindowInsetsListener(), but that might not be as straightforward and might conflict with app's own usage around windowinsets. Returning null from a default implementation and use super method until we can actually implement it in the chromium repo. (Note: I would like to merge this to R if possible.) Bug: 159610496 Test: CL does not break build/test. Change-Id: Ic0421d7347e8091e02af6c9d5a24fdb334f37c47
* [webview] rename unresponsive renderer APIsTobias Sargeant2019-03-111-4/+6
| | | | | | | | | | | | | Followup from API council review: * Rename Renderer to RenderProcess for consistency with existing APIs. * Make WebViewRenderProcess constructor public. * Document 5 second minimum interval between successive callbacks. Bug: 124767616 Bug: 123629980 Test: atest 'CtsWebkitTestCases' Change-Id: I4416a97e8bb449c4a14a3617ef72a49c92aa3a83
* Autofill, Content Capture, and Augmented Autofill API fixes:Felipe Leme2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | - Added @Nullable / @NonNull on some returned values. - Removed APIs that won't be implemented for Q. - Made Builders final. Test: m update-api Bug: 123100695 Fixes: 126702168 Fixes: 126701052 Fixes: 126702191 Fixes: 126700602 Fixes: 126700135 Fixes: 126700413 Fixes: 126698817 Fixes: 126698792 Change-Id: I20710537c02051361da18370bc5cc642cc3c26e1
* [wv] Add WebView unresponsive renderer APIs.Tobias Sargeant2019-01-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | WebViewRendererClient is a callback class responsible for informing applications about renderer state changes. Specifically, these callbacks added as part of this feature are: onRendererUnresponsive(renderer) - called when the renderer associated with a webview does not ack an input event, or a navigation does not commit within 5 seconds. The callback will continue to be called at 5 second intervals until the renderer is killed or the unresponsiveness resolves. |renderer| may be null if webview is operating in single process mode. onRendererResponsive(renderer) - called once when an unresponsive renderer becomes responsive again. This CL also adds the ability to get a webview renderer handle from a WebView instance, and then terminate that renderer. This allows recovery from unresponsive renderer situations when webview is in multiprocess mode and termination is correctly handled via WebViewClient.onRendererUnresponsive(). Bug: 111332462 Test: CTS test TBD Change-Id: I0ec026f539a70f412c5567dd87a86a0d851b39ae
* Simplified View.onProvideContentCaptureStructure()Felipe Leme2018-11-161-2/+1
| | | | | | | | | | | | | | | That method was returning a boolean to indicate whether the IntelligenceManager should be notify, so views with virtual hierarchy could return false. But now it returns void and always notify, which makes the API easier to understand and use. Bug: 117944706 Test: m -j update-api doc-comment-check-docs Test: atest CtsAutoFillServiceTestCases Change-Id: I216cacb6edb144239b6eabe56ab177fc2582e1aa
* Implemented WebView.onProvideContentCaptureStructure()Felipe Leme2018-11-131-0/+6
| | | | | | | Bug: 117944706 Test: m -j update-api Change-Id: I2ad56873bae314b7bf66aa123a8ae47eecb7af2e
* Merge "Implemented WebView.isVisibleToUserForAutofill()" into pi-devTreeHugger Robot2018-03-121-5/+8
|\
| * Implemented WebView.isVisibleToUserForAutofill()Felipe Leme2018-03-071-5/+8
| | | | | | | | | | | | | | Bug: 73500079 Test: mmm -j35 frameworks/base/ Change-Id: I1a98d685f05cd6f2a8f7f62ffacd6c802557e5b6
* | Expose WebView#onCheckIsTextEditorChangwan Ryu2018-03-081-0/+5
|/ | | | | | | | | | | | WebView was never returning correct return value in onCheckIsTextEditor(). However, startinput optimization work at ag/3455281, requires a correct return value when switching between windows. Chrome-side change (crrev.com/c/952217) has dropped into 66.0.3359.14. BUG: 74199870 Test: manually verified Change-Id: I954365a70f1ff2680ed9a6d76e695c1193a4cfa3
* WebView: make notes in docs stand outNate Fischer2017-10-261-1/+1
| | | | | | | | | | | | This CL rewrites notes to use the 'note' CSS class, to help them stand out. This isn't every instance of 'note', but it catches the handful where I think there's a readability benefit to the new format. This changes a few other non-public notes for the sake of consistency. Change-Id: Icf62e34a719c79f74e74abdb55f1be42939c2f9e Fixes: 68324591 Test: make -j40 docs (and manually verify it looks good)
* WebView: wrap Java literals with {@code}Nate Fischer2017-09-051-3/+4
| | | | | | | | | | | | | | | | 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
* Added onMovedToDisplay method to WebViewTima Vaisburd2017-04-061-0/+2
| | | | | | | | Delegate the action to WebViewProvider, by default it is no-op. Bug: 36006397 Test: There is no implementation yet to test. Change-Id: Ib5101d3669a92ae81cfb34cc5db607c374712a3d
* Override View.autofill() method and call into ViewDelegateTao Bai2017-03-301-0/+6
| | | | | | | BUG: 36787841 Test: this just forwards api call. Change-Id: Ie2c9675e5a7ee2ed2a7997d1270cf388571a855b
* TextClassifier: add API to WebViewTima Vaisburd2017-03-281-0/+9
| | | | | | | | Delegate the actions to WebViewProvider, by default they are no-ops. Bug: 34780392 Test: Existing tests should be enough Change-Id: Iefb1045b44a6e8cee5d1cc2c9b194b392d33f36d
* Replaced auto-fill by autofill to keep it consistent with API style.Felipe Leme2017-03-091-1/+1
| | | | | | | | | | | | | | This change will affects 2 types of apps: autofill service implementations and apps that use autofill APIs. Since just the former is known to be used at the moment, we're not trying to keep backward compatibility with the latter. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Test: android.provider.SettingsBackupTest pass Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
* WebView: Add the definition of the renderer importance API.Tobias Sargeant2017-01-221-0/+6
| | | | | | | | | | | | | | The renderer importance API is used to specify how important out-of-process WebView renderer services are for the purposes of OOM killing and scheduling with respect to the binding application. This allows an application to - for example - specify that renderers can be killed while the application is not in the foreground, thus cleaning up additional resources. Bug: 30824898 Test: Tests await Chromium change. Change-Id: I6dca3d427d6cdb5cb7e0be6f7fb8ece64bd24af9
* YAMAFFR - Yet Another Major AutoFill Framework RefactoringFelipe Leme2017-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Explicitly split View methods into Assist and AutoFill methods, rather than use an overloaded method that takes flags. - Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and ASSIST_FLAG_NON_SANITIZED_TEXT flags to AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively. - Created a AutoFillUI class to host the auto-fill bar and other UI affordances. - Moved the temporary notifications to AutoFillUI (eventually that class will host the real UI). - Moved FillData to android.app.view.autofill package. - Split IAutoFillCallback in 2 (IAutoFillAppCallback and IAutoFillServerCallback, residing at the app and system_server respectively), so service cannot fill the app directly (which lets the framework control the UI). - Moved assist's IResultReceiver to AutoFillServiceImpl so system_server can act as a mediator between the AutoFillService implementation and the app being auto-filled. - Replaced FillData and FillableInputFields by a bunch of new objects: - FillResponse contains a group of Datasets, each representing different values that can be used to auto-fill an activity (for example, different user accounts), optional id of fields the service is interested to save, and an optional bundle for service-side extras. - Dataset contains a name, Fields, and an optional bundle for service-side extras. - Fields contain an AutoFillId (parcelable) and a value (Bundle) - Changed the temporary notifications to emulate the new workflow: - Initial notification requests the auto-fill data but do not auto-fill. - Once service calls back, a new notification is shown with the results. - Then if the user selects a dataset, the activity is auto-filled with it. - It also shows a notification to emulate what can be saved. - Created an VirtualViewDelegate for views that uses a virtual hierarchy for assist data. - Added new methods on ViewStructure to add children with virtual ids. - Added 2 methods on View to support auto-fill: - autoFill(Bundle) to auto-fill the view. - getAutoFillType() to return how the view can be auto-filled. - AutoFillType defines the input fields that support auto-fill: - Text fields (like EditText) - Toggle fields (like CheckBox) - Lists (like RadioGroup) - AutoFillType can also have a sub-type representing its semantic (for now only text fields have it, and it's the same as getInputType()). - etc :-) Bug: 31001899 Test: manual verification Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
* AutoFill Framework refactoring.Felipe Leme2016-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | | The AutoFill Framework uses the same AssitStructure provided by the Assist API and so far it was using the same methods as well, both internally and externally (public API). Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic). This CL also splits the original 'auto-fill' request in 2 types of requests, which are set by View flags: - ASSIST_FLAG_SANITIZED_TEXT - ASSIST_FLAG_NON_SANITIZED_TEXT It also added new methods and callbacks to handle save requests. Bug: 31001899 Test: manual verification Change-Id: I4eb09099dc19a43cb7e053e64d939aed3704b410
* Add APIs to get WebViewClient and WebChromeClientNate Fischer2016-10-041-0/+4
| | | | | | | | | Add getWebViewClient and getWebChromeClient to WebView and WebViewProvider. These APIs both return null if the client is not yet set. Change-Id: I22044713a43ab09a9a5a63138247bfecb60f2522 Test: N/A Bug: 31843416
* Revert "Revert "Add some View methods overrides and WebViewDelegate ↵Selim Gurun2016-03-171-0/+5
| | | | | | | | interfaces."" This reverts commit 7ef5429637e641808f6f6acdbfd2513b7f2effcf. Change-Id: I03a27148a1df5baf12fb89bca77dcb55a47b6be2
* Support for webview drag and dropHui Shu2016-02-201-0/+3
| | | | | | | WebView needs to override onDragEvent to accept drops from other apps. BUG: 27039417 Change-Id: Ie81c5ac325091cf78440785e04afcc01ddcbaab3
* Allow WebView to startActivity and receive resultsHui Shu2015-10-081-0/+3
| | | | | | | | This CL makes webview override View#onActivityResult and gives webview itnernals the access to View#startActivityForResult. BUG: 24416313 Change-Id: Ia49db1348a1f5ee0c648a8b16551d9becc7caddd
* Deprecate WebView scrollbar overlay APIPaul Miller2015-06-091-0/+4
| | | | | | | | | Deprecate setHorizontalScrollbarOverlay, setVerticalScrollbarOverlay, overlayHorizontalScrollbar, and overlayVerticalScrollbar. They've been no-ops for years, ever since WebViewChromium. BUG:21642246 Change-Id: Ia1062c53fdbaa7a0d282ba79da733a6f3b9ac84f
* Remove ViewAssistStructure and use the frameworks data structureSelim Gurun2015-06-011-1/+1
| | | | | | | | | As part of the API rename from ViewAssistStructure to ViewStructure, we added a temporary workaround to prevent build breakage. Remove the temporary workaround since the current unbundled webview package implements the updated onProvideVirtualStructure API. Change-Id: I13a5b8dee3e856eb585de53a0750bd52c7a909a7
* Add a temporary wrapper for ViewStructure until Webview APK is updatedSelim Gurun2015-05-121-2/+1
| | | | | | | | | | It turned out that after the API change from ViewAssistStructure to ViewStructure, the suggested mechanism did not work, and webview started throwing abstractmethoderror exceptions. Temporarily solve the problem by wrapping ViewStructure inside a ViewAssistStructure. Once Webview APK is updated, drop it. Change-Id: I09dfe7dac9c2bc7c037d842844c61dd879629470
* Fix issue #20655182: API Review: ViewAssistStructureDianne Hackborn2015-05-071-2/+2
| | | | | | | | | | | Fix the various view assist related APIs. Also remove the blockAssist view attribute, and instead use the window's FLAG_SECURE to drive blocking of the entire hierarchy (which is semantically correct, and will protect existing apps that have already indicated they need it). Change-Id: I6beebc86b202809cba0a356cae9607d8d0fb5e78
* Add the Assist support to WebviewSelim Gurun2015-04-061-0/+3
| | | | | | | | | Bug: 19771298 Implement the Webview API to provide assist data. Webview assist data is provided asynchronously. Change-Id: I2fbf3e5ce7779ba6664dfbc6a702880fe71d5126
* Add visual state callbacks to the WebView.Tobias Sargeant2015-03-171-0/+4
| | | | | | | | | | | | | | | | | Registering a visual state callback allows the caller to be notified after the commit, activation and swap of the current (or future) state of the DOM tree has occurred. At the point at which the callback is called, the caller can be sure that any DOM updates made prior to the registration are ready to be drawn in the next WebView#onDraw. We also provide a convenience callback related to the visual state: * WebViewClient.onPageCommitVisible; called at the earliest point at which the next draw will not render contents from the previously loaded page. Bug: 6375170 Change-Id: I17e706b6e6ba4a8c28c835552687c9f7a4623024
* Implement PostMessage API for WebviewSelim Gurun2015-03-111-0/+5
| | | | | | | | | | | Bug: 10237116 This CL implements the postmessage API for webview. It provides a way for java applications to post messages to JS frames and establish message channels, and then do full-duplex communication after that. Change-Id: Idbc2918552a4c9fd28ae1ddf19bd360e71f8a4a2
* Fix build: Revert "Add potential future APIs for postmessage"Ed Heyl2015-03-021-4/+0
| | | | This reverts commit 37bd8907cb94be69c9bd4c308e49c38524e87269.
* am 4de38166: am aef98356: am 9fc8356b: Merge "Add potential future APIs for ↵Selim Gurun2015-03-021-0/+4
|\ | | | | | | | | | | | | postmessage" * commit '4de38166c6dbc1108a64cf772abe61b6ddaa2804': Add potential future APIs for postmessage
| * Add potential future APIs for postmessageSelim Gurun2015-03-021-0/+4
| | | | | | | | | | | | | | | | Bug: 10237116 The APIs are hidden while work is ongoing. Change-Id: I3e2f06d6e41af276171b127f06bdd74924c2e74c
| * [WebView] Allow the WebView to be compiled against the system SDK.Ignacio Solla2014-11-251-0/+2
| | | | | | | | | | BUG:18152150 Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
* | Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | | | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* | Un-break the WebView build.Marcin Kosiba2015-01-081-3/+3
| | | | | | | | | | | | | | | | This renames methods that have been renamed in Ib9d403156c1fc4fb04f65f3c126d1277a44b3740 back to their original names. Change-Id: I07b2fb94b21c42c36958855d19d996f96b0ce5c4
* | Fix accessibility delegationAlan Viverette2015-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* | [WebView] Allow the WebView to be compiled against the system SDK.Ignacio Solla2014-11-121-0/+2
|/ | | | | BUG:18152150 Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
* WebView permission changeTao Bai2014-07-231-2/+0
| | | | | | | | | | 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
* Add a WebView.zoomBy API.Marcin Kosiba2014-07-181-0/+2
| | | | | | | | The WebView has zoomIn/zoomOut APIs which zoom in/out by a fixed amount. This adds a more flexible API. BUG: 13399510 Change-Id: Ia505048d5b1c48f9a3ff1c4ce7129ed2f55804f8
* Plumb temporary view detach calls through WebView.Ben Murdoch2014-07-161-0/+4
| | | | | | | | Intercept View#onStartTemporaryDetach/onFinishTemporaryDetach to handle focus changes correctly. Bug: 14313621 Change-Id: I92ba2f44359643fee63f30b9c35b1ae4183e4245
* Design a static API for clearclientcertpreferencesSelim Gurun2014-05-021-2/+0
| | | | | | Bug: 12983007 Change-Id: I869b4cd4c178b8fedf725f108fd2e369895543e9
* Add ClientCert supportSelim Gurun2014-04-241-0/+2
| | | | | | | | | Bug: 12983007 This is to add APIs for client certificates. Keep the APIs hidden until finalizing the design. Change-Id: I8a1e755e2c509cf821dff7c7df0ddd5270a5f79b
* Merge "Provide an API to set print document name."Selim Gurun2014-04-181-1/+1
|\
| * Provide an API to set print document name.Selim Gurun2014-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Bug: 13250097 The current print api for Webview does not allow setting the print document name, so all documents show up using a hardcoded name (which is visible to the user). Deprecate the current API and provide a new one that allows setting the document name. Change-Id: I7043b78e98f25bbc0e0ef33e1d6d3b0d34401e48