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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java

Issue 1161783005: [Android WebView] Send WebChromeClient.onReceivedTitle when navigating back (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
index 500d22c0806a197dbf57f69c791e9856f038b049..838dbe02ae06ba100f09ef285ed45250b7cc727f 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
@@ -89,6 +89,7 @@ public class AwContentsClientCallbackHelper {
private static final int MSG_ON_SCALE_CHANGED_SCALED = 7;
private static final int MSG_ON_RECEIVED_HTTP_ERROR = 8;
private static final int MSG_ON_PAGE_FINISHED = 9;
+ private static final int MSG_ON_RECEIVED_TITLE = 10;
// Minimum period allowed between consecutive onNewPicture calls, to rate-limit the callbacks.
private static final long ON_NEW_PICTURE_MIN_PERIOD_MILLIS = 500;
@@ -163,6 +164,11 @@ public class AwContentsClientCallbackHelper {
mContentsClient.onPageFinished(url);
break;
}
+ case MSG_ON_RECEIVED_TITLE: {
+ final String title = (String) msg.obj;
+ mContentsClient.onReceivedTitle(title);
+ break;
+ }
default:
throw new IllegalStateException(
"AwContentsClientCallbackHelper: unhandled message " + msg.what);
@@ -229,4 +235,8 @@ public class AwContentsClientCallbackHelper {
public void postOnPageFinished(String url) {
mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_PAGE_FINISHED, url));
}
+
+ public void postOnReceivedTitle(String title) {
+ mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_RECEIVED_TITLE, title));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698