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

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

Issue 23125022: Merge 219111 "Start renderer in ContentViewCoreImpl::EvaluateJav..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
===================================================================
--- content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (revision 219349)
+++ content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (working copy)
@@ -1373,10 +1373,23 @@
public void evaluateJavaScript(
String script, JavaScriptCallback callback) throws IllegalStateException {
checkIsAlive();
- nativeEvaluateJavaScript(mNativeContentViewCore, script, callback);
+ nativeEvaluateJavaScript(mNativeContentViewCore, script, callback, false);
}
/**
+ * Injects the passed Javascript code in the current page and evaluates it.
+ * If there is no page existing, a new one will be created.
+ *
+ * @param script The Javascript to execute.
+ * @throws IllegalStateException If the ContentView has been destroyed.
+ */
+ public void evaluateJavaScriptEvenIfNotYetNavigated(String script)
+ throws IllegalStateException {
+ checkIsAlive();
+ nativeEvaluateJavaScript(mNativeContentViewCore, script, null, true);
+ }
+
+ /**
* This method should be called when the containing activity is paused.
*/
public void onActivityPause() {
@@ -3126,7 +3139,7 @@
private native void nativeClearHistory(int nativeContentViewCoreImpl);
private native void nativeEvaluateJavaScript(int nativeContentViewCoreImpl,
- String script, JavaScriptCallback callback);
+ String script, JavaScriptCallback callback, boolean startRenderer);
private native int nativeGetNativeImeAdapter(int nativeContentViewCoreImpl);
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698