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

Issue 1544863002: [Android WebView] Implement initial settings and callback support for Service Workers. (Closed)

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

Description

[Android WebView] Implement initial settings and callback support for Service Workers. Service Workers are not tied to AwContents as regular webviews are and therefore do not invoke callbacks provided in WebViewClient and WebChromeClient. This patch provides initial implementation of AwServiceWorkerClient, AwServiceWorkerSettings and related infrastructure. In particular it implements the shouldInterceptRequest callback mechanism for service worker related requests. The callback is invoked when a service worker script is registered and also for network fetches from within the service worker script. This patch also contains a fix for TestWebServer to make it work with service workers. BUG=566027 Committed: https://crrev.com/47612e474a203be05f6c4f8f257902615e8406d2 Cr-Commit-Position: refs/heads/master@{#370998}

Patch Set 1 #

Patch Set 2 : add proper aw_request_interceptor changes and clean-up #

Patch Set 3 : more clean-up #

Total comments: 8

Patch Set 4 : address comments, browser context, add settings #

Total comments: 16

Patch Set 5 : address comments, fix TestWebServer and add more testing #

Total comments: 8

Patch Set 6 : fix comments #

Patch Set 7 : rebase #

Patch Set 8 : add AwServiceWorkerManager and declutter AwBrowserContext #

Patch Set 9 : remove third party cookies setting #

Patch Set 10 : fix test compilation #

Patch Set 11 : rebase #

Patch Set 12 : rename AwServiceWorkerManager -> AwServiceWorkerController #

Patch Set 13 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+525 lines, -7 lines) Patch
M android_webview/browser/aw_contents_io_thread_client.h View 1 chunk +4 lines, -0 lines 0 comments Download
M android_webview/browser/net/aw_request_interceptor.cc View 1 2 3 4 2 chunks +24 lines, -7 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwServiceWorkerClient.java View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwServiceWorkerController.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +117 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwServiceWorkerSettings.java View 1 2 3 4 5 6 7 8 1 chunk +134 lines, -0 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/AwServiceWorkerClientTest.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +107 lines, -0 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/TestAwServiceWorkerClient.java View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents_io_thread_client_impl.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents_io_thread_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +29 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents_statics.cc View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 28 (14 generated)
timvolodine
4 years, 11 months ago (2016-01-06 15:59:15 UTC) #4
timvolodine
+mnaganov@: ptal, thanks!
4 years, 11 months ago (2016-01-11 18:51:45 UTC) #6
mnaganov (inactive)
The major comment that we have already discussed is that the instance of the service ...
4 years, 11 months ago (2016-01-12 00:42:03 UTC) #7
timvolodine
Thanks for the comments! Moved the service worker and related bits to browser context. Added ...
4 years, 11 months ago (2016-01-13 17:07:58 UTC) #9
mnaganov (inactive)
https://codereview.chromium.org/1544863002/diff/40001/android_webview/browser/net/aw_request_interceptor.cc File android_webview/browser/net/aw_request_interceptor.cc (right): https://codereview.chromium.org/1544863002/diff/40001/android_webview/browser/net/aw_request_interceptor.cc#newcode122 android_webview/browser/net/aw_request_interceptor.cc:122: return AwContentsIoThreadClient::GetServiceWorkerIoThreadClient(); On 2016/01/13 17:07:58, timvolodine wrote: > On ...
4 years, 11 months ago (2016-01-13 17:55:27 UTC) #10
timvolodine
thanks again, replies below https://codereview.chromium.org/1544863002/diff/40001/android_webview/browser/net/aw_request_interceptor.cc File android_webview/browser/net/aw_request_interceptor.cc (right): https://codereview.chromium.org/1544863002/diff/40001/android_webview/browser/net/aw_request_interceptor.cc#newcode122 android_webview/browser/net/aw_request_interceptor.cc:122: return AwContentsIoThreadClient::GetServiceWorkerIoThreadClient(); On 2016/01/13 17:55:27, ...
4 years, 11 months ago (2016-01-14 19:43:56 UTC) #13
timvolodine
+phajdan.jr@chromium.org for TestWebServer.java
4 years, 11 months ago (2016-01-14 19:46:25 UTC) #15
mnaganov (inactive)
LGTM % comments https://codereview.chromium.org/1544863002/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java File android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java (right): https://codereview.chromium.org/1544863002/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java#newcode106 android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java:106: AwContentsStatics.setServiceWorkerIoThreadClient(null, this); If passing 'null' is ...
4 years, 11 months ago (2016-01-14 21:13:39 UTC) #16
timvolodine
https://codereview.chromium.org/1544863002/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java File android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java (right): https://codereview.chromium.org/1544863002/diff/80001/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java#newcode106 android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java:106: AwContentsStatics.setServiceWorkerIoThreadClient(null, this); On 2016/01/14 21:13:39, mnaganov wrote: > If ...
4 years, 11 months ago (2016-01-15 13:36:05 UTC) #17
Paweł Hajdan Jr.
net/test LGTM
4 years, 11 months ago (2016-01-15 13:39:22 UTC) #18
timvolodine
FYI I've applied two (small) changes: 1. Introduced AwServiceWorkerManager to more naturally correspond with the ...
4 years, 11 months ago (2016-01-21 20:37:46 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1544863002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1544863002/240001
4 years, 11 months ago (2016-01-22 18:27:50 UTC) #24
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 11 months ago (2016-01-22 18:35:39 UTC) #26
commit-bot: I haz the power
4 years, 11 months ago (2016-01-22 18:37:00 UTC) #28
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/47612e474a203be05f6c4f8f257902615e8406d2
Cr-Commit-Position: refs/heads/master@{#370998}

Powered by Google App Engine
This is Rietveld 408576698