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

Issue 1161783005: [Android WebView] Send WebChromeClient.onReceivedTitle when navigating back (Closed)

Created:
5 years, 6 months ago by mnaganov (inactive)
Modified:
5 years, 6 months ago
Reviewers:
Torne
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

[Android WebView] Send WebChromeClient.onReceivedTitle when navigating back This is a re-land of https://codereview.chromium.org/1126383005, fixed not to cause a crash when 'WebView.loadUrl' is called from inside the onReceivedTitle callback, added a regression test. Also, the document title is now cached to minimize the amount of callback calls. Original patch description: The usual channel for delivering onReceivedTitle (via updating title for a NavigationEntry) doesn't work in the case of history navigations, because WebContentsImpl silences no-op updates of entries titles. Chrome Browser uses another event for updating the title in this case -- via WebContentsDelegate::LoadingStateChanged. This patch enables WebView to use it as well. Note that WebChromeClient.onReceivedIcon doesn't need to be re-sent, as nobody seems to bother checking whether the icon update is a "no-op", so updates on history navigations just work. BUG=481570, 495234 Committed: https://crrev.com/27cdc32e21149f7bc890ddd9347e4a963e4899ee Cr-Commit-Position: refs/heads/master@{#333056}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixed notification sending when titles of two pages are the same #

Total comments: 1

Patch Set 3 : Fixed typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -5 lines) Patch
M android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java View 1 chunk +1 line, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java View 1 1 chunk +1 line, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClient.java View 1 3 chunks +13 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java View 3 chunks +10 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java View 1 chunk +5 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java View 1 1 chunk +5 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadUrlTest.java View 1 2 1 chunk +80 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java View 1 chunk +30 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java View 4 chunks +23 lines, -3 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.cc View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
mnaganov (inactive)
5 years, 6 months ago (2015-06-02 16:28:16 UTC) #2
Torne
Just one question; if that's not a problem then LGTM. https://codereview.chromium.org/1161783005/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java File android_webview/java/src/org/chromium/android_webview/AwContentsClient.java (right): https://codereview.chromium.org/1161783005/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java#newcode52 ...
5 years, 6 months ago (2015-06-04 13:28:47 UTC) #3
mnaganov (inactive)
https://codereview.chromium.org/1161783005/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java File android_webview/java/src/org/chromium/android_webview/AwContentsClient.java (right): https://codereview.chromium.org/1161783005/diff/1/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java#newcode52 android_webview/java/src/org/chromium/android_webview/AwContentsClient.java:52: // so behaviours are consistent. On 2015/06/04 13:28:47, Torne ...
5 years, 6 months ago (2015-06-04 23:27:36 UTC) #4
Torne
Thanks, LGTM now other than one typo. It would be nice if we could assume ...
5 years, 6 months ago (2015-06-05 14:37:31 UTC) #5
mnaganov (inactive)
On 2015/06/05 14:37:31, Torne wrote: > Thanks, LGTM now other than one typo. It would ...
5 years, 6 months ago (2015-06-05 15:15:32 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1161783005/40001
5 years, 6 months ago (2015-06-05 15:16:52 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 6 months ago (2015-06-05 15:40:43 UTC) #10
commit-bot: I haz the power
5 years, 6 months ago (2015-06-05 15:42:35 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/27cdc32e21149f7bc890ddd9347e4a963e4899ee
Cr-Commit-Position: refs/heads/master@{#333056}

Powered by Google App Engine
This is Rietveld 408576698