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

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

Issue 924833003: [Android WebView] Synthesize a fake page loading event on page source modification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra space Created 5 years, 10 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
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 8d0d278c0f250dc7a8492da604d3ef823ecbe74f..f199bec7386ed3f75cf21d466cf0a673d71d0692 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1239,6 +1239,19 @@ public class AwContents implements SmartClipProvider,
return url;
}
+ /**
+ * Gets the last committed URL. It represents the current page that is
+ * displayed in WebContents. It represents the current security context.
+ *
+ * @return The URL of the current page or null if it's empty.
+ */
+ public String getLastCommittedUrl() {
+ if (isDestroyed()) return null;
+ String url = mWebContents.getLastCommittedUrl();
+ if (url == null || url.trim().isEmpty()) return null;
+ return url;
+ }
+
public void requestFocus() {
mAwViewMethods.requestFocus();
}
@@ -1831,6 +1844,11 @@ public class AwContents implements SmartClipProvider,
return ports;
}
+ public boolean hasAccessedInitialDocument() {
+ if (isDestroyed()) return false;
+ return mWebContents.hasAccessedInitialDocument();
+ }
+
//--------------------------------------------------------------------------------------------
// View and ViewGroup method implementations
//--------------------------------------------------------------------------------------------
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698