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

Issue 23018005: Start renderer in ContentViewCoreImpl::EvaluateJavaScript. (Closed)

Created:
7 years, 4 months ago by michaelbai
Modified:
7 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Start renderer in ContentViewCoreImpl::EvaluateJavaScript. In WebView, the app could evaluate the Javascript before loading any page. This patch start renderer if there is no existing one. Since renderer was created without SiteInstance, the RenderViewCreated callback will not be called, this patch also call it even without SiteInstance. BUG=273164 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219111

Patch Set 1 #

Patch Set 2 : really fix issue #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : Address comments #

Total comments: 11

Patch Set 5 : Address comments #

Total comments: 3

Patch Set 6 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -10 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 2 chunks +14 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 2 chunks +15 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
michaelbai
7 years, 4 months ago (2013-08-14 20:29:18 UTC) #1
joth
lgtm can we add a test for this? (suggest separate patch to keep merge simpler) ...
7 years, 4 months ago (2013-08-14 21:37:35 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelbai@chromium.org/23018005/1
7 years, 4 months ago (2013-08-14 21:46:14 UTC) #3
Yaron
On 2013/08/14 21:46:14, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 4 months ago (2013-08-14 22:03:33 UTC) #4
michaelbai
On 2013/08/14 22:03:33, Yaron wrote: > On 2013/08/14 21:46:14, I haz the power (commit-bot) wrote: ...
7 years, 4 months ago (2013-08-14 22:14:56 UTC) #5
joth
On 14 August 2013 15:03, <yfriedman@chromium.org> wrote: > On 2013/08/14 21:46:14, I haz the power ...
7 years, 4 months ago (2013-08-14 22:54:40 UTC) #6
Yaron
Right, I meant that in practice we don't have that now and it would arguably ...
7 years, 4 months ago (2013-08-14 23:20:05 UTC) #7
joth
The alternative of doing this entirely in aw/ means adding new public API to "start ...
7 years, 4 months ago (2013-08-14 23:25:55 UTC) #8
michaelbai
On 2013/08/14 23:25:55, joth wrote: > The alternative of doing this entirely in aw/ means ...
7 years, 4 months ago (2013-08-14 23:35:48 UTC) #9
michaelbai
Need to create the renderer from WebContentsImpl, also call the observer for RenderViewCreated() https://codereview.chromium.org/23018005/diff/30001/content/browser/web_contents/web_contents_impl.cc File ...
7 years, 4 months ago (2013-08-20 00:40:22 UTC) #10
joth
Wasn't quite clear if this is ready for review? https://codereview.chromium.org/23018005/diff/30001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/23018005/diff/30001/content/browser/android/content_view_core_impl.cc#newcode1482 content/browser/android/content_view_core_impl.cc:1482: ...
7 years, 4 months ago (2013-08-20 05:00:43 UTC) #11
michaelbai
PTAL https://codereview.chromium.org/23018005/diff/30001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/23018005/diff/30001/content/browser/android/content_view_core_impl.cc#newcode1482 content/browser/android/content_view_core_impl.cc:1482: static_cast<WebContentsImpl*>(web_contents_); On 2013/08/20 05:00:44, joth wrote: > just ...
7 years, 4 months ago (2013-08-20 19:15:20 UTC) #12
joth
+creis could you take a look at the web_contents_impl changes, or suggest someone who could? ...
7 years, 4 months ago (2013-08-20 19:37:46 UTC) #13
Charlie Reis
Yes, I'll take a look soon. It looks like there may be some misunderstanding here, ...
7 years, 4 months ago (2013-08-20 20:51:57 UTC) #14
Charlie Reis
As I mentioned, I don't think this is ok to add. Hopefully we can find ...
7 years, 4 months ago (2013-08-20 22:03:48 UTC) #15
michaelbai
The very basic use case is 1. The app runs JavaScript before load any page ...
7 years, 4 months ago (2013-08-20 22:25:53 UTC) #16
joth
Just to add to what Michael said, this is not a "new" requirement being invented, ...
7 years, 4 months ago (2013-08-20 22:29:24 UTC) #17
Charlie Reis
Ok, after some discussion offline, it sounds like Android WebViews have a specific hack that ...
7 years, 4 months ago (2013-08-21 22:06:26 UTC) #18
michaelbai
Thanks creis, PTAL https://codereview.chromium.org/23018005/diff/36001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/23018005/diff/36001/content/browser/android/content_view_core_impl.cc#newcode1482 content/browser/android/content_view_core_impl.cc:1482: if (!web_contents_->CreateRenderViewWithoutNavigationEntry(rvh)) { Already tried, the ...
7 years, 4 months ago (2013-08-21 23:32:16 UTC) #19
palmer
How bad is it if we break backwards compat with Android WebView's strange behavior?
7 years, 4 months ago (2013-08-21 23:40:34 UTC) #20
Charlie Reis
Thanks. content/ LGTM, but let's have a plan for deprecating this when apps move to ...
7 years, 4 months ago (2013-08-22 00:09:52 UTC) #21
joth
On 21 August 2013 16:40, <palmer@chromium.org> wrote: > How bad is it if we break ...
7 years, 4 months ago (2013-08-22 01:54:48 UTC) #22
michaelbai
jochen@ for content/browser/web_contents
7 years, 4 months ago (2013-08-22 05:24:48 UTC) #23
joth
https://codereview.chromium.org/23018005/diff/45001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/23018005/diff/45001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode1384 android_webview/java/src/org/chromium/android_webview/AwContents.java:1384: mContentViewCore.evaluateJavaScriptEvenIfNotYetNavigated(script, jsCallback); Given creis's comments I don't think we ...
7 years, 4 months ago (2013-08-22 05:44:41 UTC) #24
Charlie Reis
On 2013/08/22 05:24:48, michaelbai wrote: > jochen@ for content/browser/web_contents FYI, I'm a content/ owner, so ...
7 years, 4 months ago (2013-08-22 16:15:58 UTC) #25
michaelbai
PTAL, I removed the callback parameter for evaluateJavaScriptEvenIfNotYetNavigated. https://codereview.chromium.org/23018005/diff/45001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/23018005/diff/45001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode1384 android_webview/java/src/org/chromium/android_webview/AwContents.java:1384: mContentViewCore.evaluateJavaScriptEvenIfNotYetNavigated(script, ...
7 years, 4 months ago (2013-08-22 17:53:01 UTC) #26
joth
lgtm
7 years, 4 months ago (2013-08-22 18:31:30 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelbai@chromium.org/23018005/57001
7 years, 4 months ago (2013-08-22 18:35:55 UTC) #28
commit-bot: I haz the power
7 years, 4 months ago (2013-08-22 21:41:54 UTC) #29
Message was sent while issue was closed.
Change committed as 219111

Powered by Google App Engine
This is Rietveld 408576698