[Android WebView] Send WebChromeClient.onReceivedTitle when navigating back
commit38d1092ea27df0818a8a20b114fcf0cac9018a68
authormnaganov <mnaganov@chromium.org>
Tue, 12 May 2015 15:07:17 +0000 (12 08:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 15:07:29 +0000 (12 15:07 +0000)
treec933c068c5f6cdeda9680643dc08ff90635bb994
parentf7ed9b85d9b6ed0d0dfa80d9838890200c399c07
[Android WebView] Send WebChromeClient.onReceivedTitle when navigating back

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

Review URL: https://codereview.chromium.org/1126383005

Cr-Commit-Position: refs/heads/master@{#329408}
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java
android_webview/native/aw_web_contents_delegate.cc
android_webview/native/aw_web_contents_delegate.h