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

Unified Diff: content/public/android/java/src/org/chromium/content_public/browser/WebContents.java

Issue 464393002: Restructuring WebContents functions from ContentViewCore to WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed C++ variable naming issues. Created 6 years, 4 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: content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
index b24c1d1f7869f398cdeee7d1d946b606015214e0..5db2c7cad12d86e35987f5ead38b51aef784afe2 100644
--- a/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
+++ b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
@@ -146,4 +146,18 @@ public interface WebContents {
*/
public void beginExitTransition(String cssSelector);
+ /**
+ * Injects the passed Javascript code in the current page and evaluates it.
+ * If a result is required, pass in a callback.
+ *
+ * @param script The Javascript to execute.
+ * @param callback The callback to be fired off when a result is ready. The script's
+ * result will be json encoded and passed as the parameter, and the call
+ * will be made on the main thread.
+ * If no result is required, pass null.
+ * @param startRenderer Tells whether to start Renderer or not for initial empty document
+ */
+ public void evaluateJavaScript(String script, JavaScriptCallback callback,
+ boolean startRenderer);
+
}

Powered by Google App Engine
This is Rietveld 408576698