New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627248 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

add getter for WebViewClient and WebChromeClient

Project Member Reported by sgu...@chromium.org, Jul 11 2016

Issue description

Some embedders need to access WebViewClient and need to use reflection to get to it since we don't have an API. This is to add a proper API to get to it.

We should also look at other places where we have only setters and no getters and add when reasonable.
 

Comment 1 by boliu@chromium.org, Jul 11 2016

I don't fully agree with this.

the only use case I can think of is wrapping the clients, which is useful if it can't control code that creates the webview and clients. maybe should ask moat people if that's what they are trying to do

I'm not sure we want to encourage that use case regular day apps. So many things can go wrong..

Comment 2 by sgu...@chromium.org, Jul 11 2016

yes the use case you outlined in paragraph #2 is an important use case ant that is the target.

what are these so many things that can go wrong?

Comment 3 by boliu@chromium.org, Jul 11 2016

letting another party sit between webview and client sounds bad to me and can open up all sorts of new edge cases, like methods being reordered and whatnot

plus clients are designed so that one client can be used with many webviews, so if not done carefully, could lead to wrapping multiple times etc

Comment 4 by torne@chromium.org, Jul 12 2016

People are already doing it via dodgy reflection that has caused us to have to delay a release, so while I agree that this is probably a bad thing to be doing, not having the getter isn't stopping anybody, and I don't think adding a getter is going to make anyone start doing this who isn't already. We should just add it so that we can yell at people to stop doing the reflection on newer versions.

Comment 5 by boliu@chromium.org, Jul 12 2016

I mean.., we can yell at people today whether what they want to do is supported or not. They could have easily just asked the app to give them whatever object they need.

I was contemplating yesterday maybe we should make the WebViewClient an object as well, which would totally break their reflection bfs entirely.

Comment 6 by sgu...@chromium.org, Jul 22 2016

Owner: sgu...@chromium.org
Status: Assigned (was: Untriaged)

Comment 7 by sgu...@chromium.org, Sep 29 2016

Cc: sgu...@chromium.org
Owner: ntfschr@chromium.org

Comment 8 by sgu...@chromium.org, Sep 29 2016

Nate, as you started making API changes, this is also a good one to work on.
On it.
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 30 2016

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e4aa5f84630cfa5934bec31f74a00dd0145f9d3

commit 8e4aa5f84630cfa5934bec31f74a00dd0145f9d3
Author: ntfschr <ntfschr@chromium.org>
Date: Mon Oct 03 21:49:31 2016

modify getWebViewClient behavior

getWebViewClient returns the default client instead of null when the client is
not yet set.

BUG= 627248 

Implement getWebViewClient and getWebChromeClient

Implement getWebViewClient and getWebChromeClient for new APIs in Android

Review-Url: https://codereview.chromium.org/2384063003
Cr-Commit-Position: refs/heads/master@{#422547}

[modify] https://crrev.com/8e4aa5f84630cfa5934bec31f74a00dd0145f9d3/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java

Status: Started (was: Assigned)
Status: Fixed (was: Started)
Closing, since cts have since been merged (see b/31843416)
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03196aef15b20c24ea95a475bedc32ca65b5230e

commit 03196aef15b20c24ea95a475bedc32ca65b5230e
Author: Nate Fischer <ntfschr@chromium.org>
Date: Thu Aug 17 00:03:04 2017

AW: add @Override to new APIs

No logic change.

This cleans up some TODOs by adding @Override to new methods in the O
SDK.

Bug:  627248 ,  649816 , 706631
Test: ninja system_webview_google_apk && ninja system_webview_apk
Change-Id: I1973660491e1ac7a46a9fead3048b976f93cd085
Reviewed-on: https://chromium-review.googlesource.com/618125
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495004}
[modify] https://crrev.com/03196aef15b20c24ea95a475bedc32ca65b5230e/android_webview/glue/java/src/com/android/webview/chromium/ContentSettingsAdapter.java
[modify] https://crrev.com/03196aef15b20c24ea95a475bedc32ca65b5230e/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
[modify] https://crrev.com/03196aef15b20c24ea95a475bedc32ca65b5230e/android_webview/glue/java/src/com/android/webview/chromium/WebViewDatabaseAdapter.java

Status: Verified (was: Fixed)
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point.

Sign in to add a comment