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

Issue 11348075: [Android WebView] AwContentsClient.shouldCreate window callback part 2. (Closed)

Created:
8 years, 1 month ago by benm (inactive)
Modified:
8 years ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Visibility:
Public.

Description

[Android WebView] AwContentsClient.shouldCreate window callback part 2. Part 1: https://chromiumcodereview.appspot.com/11362183/ The second part of this change implements the "true" path, i.e. the user provides us with a new AwContents to host the popup window. This arrives asynchronously. While we are waiting for the reply from the user, we defer loading of the popup contents using a resource throttle. When we receive the callback we replace the ContentViewCore that is contained in the new AwContents with one that wraps the WebContents for the popup. This triggers an update to the AwIoThreadClient for that AwContents, which resumes the deferred load for the popup. Android only change and android bots green NOTRY=TRUE Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170721

Patch Set 1 #

Patch Set 2 : fix clang #

Total comments: 44

Patch Set 3 : address joth's comments. #

Patch Set 4 : Address Marcin's comments. #

Total comments: 13

Patch Set 5 : rebase and refactor for joth's comments #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 16

Patch Set 8 : fix comments #

Patch Set 9 : fix spurious includes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -48 lines) Patch
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -1 line 0 comments Download
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 5 chunks +149 lines, -33 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 chunks +69 lines, -5 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClient.java View 1 chunk +3 lines, -1 line 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 7 7 chunks +33 lines, -2 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.cc View 1 2 3 4 5 6 7 2 chunks +16 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
benm (inactive)
ptal joth! Probably needs some tidying up but hopefully the general approach is sound!
8 years, 1 month ago (2012-11-15 19:44:57 UTC) #1
joth
this looks good :) prefer this design to re-wiring the ContentViewCore internals. https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h ...
8 years, 1 month ago (2012-11-16 06:24:31 UTC) #2
mkosiba (inactive)
https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h#newcode50 android_webview/browser/aw_contents_io_thread_client.h:50: I think the usual pattern is to declare ReadyObserver ...
8 years, 1 month ago (2012-11-16 12:28:32 UTC) #3
benm (inactive)
thanks joth! https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h#newcode46 android_webview/browser/aw_contents_io_thread_client.h:46: class ReadyObserver { On 2012/11/16 06:24:31, joth ...
8 years, 1 month ago (2012-11-16 12:29:09 UTC) #4
benm (inactive)
thanks martin! https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h#newcode50 android_webview/browser/aw_contents_io_thread_client.h:50: Do you have a precedent? I had ...
8 years, 1 month ago (2012-11-16 12:36:31 UTC) #5
mkosiba (inactive)
https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h#newcode50 android_webview/browser/aw_contents_io_thread_client.h:50: On 2012/11/16 12:36:31, benm wrote: > Do you have ...
8 years, 1 month ago (2012-11-16 13:55:18 UTC) #6
benm (inactive)
https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/browser/aw_contents_io_thread_client.h#newcode50 android_webview/browser/aw_contents_io_thread_client.h:50: OK, thanks. think i will leave as is then.
8 years, 1 month ago (2012-11-16 14:00:26 UTC) #7
joth
https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://chromiumcodereview.appspot.com/11348075/diff/5001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode389 android_webview/java/src/org/chromium/android_webview/AwContents.java:389: nativeReInit(mNativeAwContents, newWebContentsPtr); On 2012/11/16 12:29:09, benm wrote: > I ...
8 years, 1 month ago (2012-11-16 21:52:56 UTC) #8
joth
FYI http://codereview.chromium.org/11348075/diff/12001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): http://codereview.chromium.org/11348075/diff/12001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode398 android_webview/java/src/org/chromium/android_webview/AwContents.java:398: } In my patch, I've had to add ...
8 years, 1 month ago (2012-11-17 01:38:21 UTC) #9
benm (inactive)
thanks joth, new iteration soon https://codereview.chromium.org/11348075/diff/12001/android_webview/browser/aw_contents_io_thread_client.h File android_webview/browser/aw_contents_io_thread_client.h (right): https://codereview.chromium.org/11348075/diff/12001/android_webview/browser/aw_contents_io_thread_client.h#newcode51 android_webview/browser/aw_contents_io_thread_client.h:51: virtual void OnIoThreadClientReady(int child_id, ...
8 years ago (2012-11-28 20:00:05 UTC) #10
joth
https://codereview.chromium.org/11348075/diff/12001/android_webview/native/aw_contents_io_thread_client_impl.cc File android_webview/native/aw_contents_io_thread_client_impl.cc (right): https://codereview.chromium.org/11348075/diff/12001/android_webview/native/aw_contents_io_thread_client_impl.cc#newcode112 android_webview/native/aw_contents_io_thread_client_impl.cc:112: } On 2012/11/28 20:00:05, benm wrote: > On 2012/11/16 ...
8 years ago (2012-11-28 20:38:13 UTC) #11
benm (inactive)
Bots are green, ptal.
8 years ago (2012-11-29 19:01:21 UTC) #12
joth
aside from thread safety issue with the map, just non-functional nits. (I'm OOO tomorrow so ...
8 years ago (2012-11-29 21:02:32 UTC) #13
benm (inactive)
thanks joth! https://codereview.chromium.org/11348075/diff/1029/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/11348075/diff/1029/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode56 android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc:56: IoThreadClientThrottle::~IoThreadClientThrottle() { On 2012/11/29 21:02:33, joth wrote: ...
8 years ago (2012-11-30 12:54:18 UTC) #14
joth
lgtm
8 years ago (2012-11-30 22:54:33 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benm@chromium.org/11348075/6013
8 years ago (2012-12-03 10:13:54 UTC) #16
commit-bot: I haz the power
8 years ago (2012-12-03 10:14:12 UTC) #17
Message was sent while issue was closed.
Change committed as 170721

Powered by Google App Engine
This is Rietveld 408576698