Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Issue 985833004: Move NullWebViewClient implementation to chromium layer (Closed)

Created:
5 years, 9 months ago by boliu
Modified:
5 years, 9 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move NullWebViewClient implementation to chromium layer Add AwContentsClient#hasWebViewClient so chromium layer knows when the WebViewClient is null, and can fallback to default implementations. Then move the default implementations to chrome layer. Changes in implementation: Use ContextWrapper instead of view.getContext(). This means the "context instanceof Activity" check will never return true. Use ContentViewCore.activityFromContext to check instead. Call ContentViewClient.shouldOverrideKeyEvent directly instead of keeping another copy of the implementation. BUG=464491 Committed: https://crrev.com/1994b54ee3a21f9b9a36a6e83fa5c26cef9606bc Cr-Commit-Position: refs/heads/master@{#319736}

Patch Set 1 #

Total comments: 3

Patch Set 2 : run time check activity + wrapper #

Total comments: 2

Patch Set 3 : ContentViewCore.activityFromContext #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -87 lines) Patch
M android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java View 1 2 3 7 chunks +14 lines, -84 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java View 1 2 4 chunks +52 lines, -3 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClient.java View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
boliu
Even though I probably shouldn't land this, sending this out to see if you guys ...
5 years, 9 months ago (2015-03-06 22:10:41 UTC) #2
boliu
We could expose ContextWrapper to chromium code, and call getBaseContext(). One step back from that, ...
5 years, 9 months ago (2015-03-06 22:19:32 UTC) #3
boliu
PS2 has the dirty hack..
5 years, 9 months ago (2015-03-06 22:35:14 UTC) #4
hush (inactive)
https://codereview.chromium.org/985833004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java File android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java (right): https://codereview.chromium.org/985833004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java#newcode50 android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java:50: private static boolean isActivityContext(Context context) { ContextWrapper is already ...
5 years, 9 months ago (2015-03-06 23:43:55 UTC) #5
sgurun-gerrit only
https://codereview.chromium.org/985833004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java File android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java (right): https://codereview.chromium.org/985833004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java#newcode93 android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java:93: // The check below is reflecting Clank's behavior and ...
5 years, 9 months ago (2015-03-07 00:11:35 UTC) #6
boliu
New patch set up https://codereview.chromium.org/985833004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java File android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java (right): https://codereview.chromium.org/985833004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java#newcode93 android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java:93: // The check below is ...
5 years, 9 months ago (2015-03-07 00:41:42 UTC) #7
hush (inactive)
lgtm
5 years, 9 months ago (2015-03-07 01:19:35 UTC) #8
boliu
cts WebViewClientTest still pass
5 years, 9 months ago (2015-03-09 20:21:22 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985833004/40001
5 years, 9 months ago (2015-03-09 20:22:51 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/3638) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 9 months ago (2015-03-09 20:26:55 UTC) #13
boliu
cts still pass on rebased patch too :p
5 years, 9 months ago (2015-03-09 20:35:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985833004/60001
5 years, 9 months ago (2015-03-09 20:36:19 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-09 21:26:17 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 21:26:42 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1994b54ee3a21f9b9a36a6e83fa5c26cef9606bc
Cr-Commit-Position: refs/heads/master@{#319736}

Powered by Google App Engine
This is Rietveld 408576698