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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.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/browser/webcontents/WebContentsImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
index 4b8f9cbb4a1d713df71d98143a3fd69165033d23..c2cffa9027e4f9cdc315015ccd6c583a314bee0b 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -6,6 +6,7 @@ package org.chromium.content.browser.webcontents;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
+import org.chromium.content_public.browser.JavaScriptCallback;
import org.chromium.content_public.browser.NavigationController;
import org.chromium.content_public.browser.NavigationTransitionDelegate;
import org.chromium.content_public.browser.WebContents;
@@ -167,6 +168,7 @@ import org.chromium.content_public.browser.WebContents;
/**
* Inserts the provided markup sandboxed into the frame.
*/
+ @Override
public void setupTransitionView(String markup) {
nativeSetupTransitionView(mNativeWebContentsAndroid, markup);
}
@@ -175,6 +177,7 @@ import org.chromium.content_public.browser.WebContents;
* Hides transition elements specified by the selector, and activates any
* exiting-transition stylesheets.
*/
+ @Override
public void beginExitTransition(String cssSelector) {
nativeBeginExitTransition(mNativeWebContentsAndroid, cssSelector);
}
@@ -208,6 +211,18 @@ import org.chromium.content_public.browser.WebContents;
}
}
+ @Override
+ public void evaluateJavaScript(String script, JavaScriptCallback callback,
+ boolean startRenderer) {
+ nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback, true);
+ }
+
+ @CalledByNative
+ private static void onEvaluateJavaScriptResult(
+ String jsonResult, JavaScriptCallback callback) {
+ callback.handleJavaScriptResult(jsonResult);
+ }
+
private native String nativeGetTitle(long nativeWebContentsAndroid);
private native String nativeGetVisibleURL(long nativeWebContentsAndroid);
private native void nativeStop(long nativeWebContentsAndroid);
@@ -236,4 +251,6 @@ import org.chromium.content_public.browser.WebContents;
String markup);
private native void nativeBeginExitTransition(long nativeWebContentsAndroid,
String cssSelector);
+ private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid,
+ String script, JavaScriptCallback callback, boolean startRenderer);
}

Powered by Google App Engine
This is Rietveld 408576698