Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
index dc4675c794ed9a8ecae5f8110423b28f30dd2a3d..09ac6d47356a3091707ecbe342bfc5b1a6c68c24 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
@@ -34,6 +34,7 @@ import org.chromium.content.browser.accessibility.AccessibilityInjector; |
import org.chromium.content.browser.ContentViewGestureHandler.MotionEventDelegate; |
/** |
+ * Provides a Java-side 'wrapper' around a WebContent (native) instance. |
* Contains all the major functionality necessary to manage the lifecycle of a ContentView without |
* being tied to the view system. |
*/ |
@@ -336,6 +337,14 @@ public class ContentViewCore implements MotionEventDelegate { |
} |
/** |
+ * This is only useful for passing over JNI to native code that requires ContentViewCore*. |
+ * @return native ContentViewCore pointer. |
+ */ |
+ public int getNativeContentViewCore() { |
+ return mNativeContentViewCore; |
+ } |
+ |
+ /** |
* For internal use. Throws IllegalStateException if mNativeContentView is 0. |
* Use this to ensure we get a useful Java stack trace, rather than a native |
* crash dump, from use-after-destroy bugs in Java code. |
@@ -420,16 +429,6 @@ public class ContentViewCore implements MotionEventDelegate { |
return null; |
} |
- /** |
- * @return The load progress of current web contents (range is 0 - 100). |
- */ |
- public int getProgress() { |
- if (mNativeContentViewCore != 0) { |
- return (int) (100.0 * nativeGetLoadProgress(mNativeContentViewCore)); |
- } |
- return 100; |
- } |
- |
public int getWidth() { |
return mContainerView.getWidth(); |
} |
@@ -1148,8 +1147,6 @@ public class ContentViewCore implements MotionEventDelegate { |
private native String nativeGetTitle(int nativeContentViewCoreImpl); |
- private native double nativeGetLoadProgress(int nativeContentViewCoreImpl); |
- |
private native boolean nativeIsIncognito(int nativeContentViewCoreImpl); |
// Returns true if the native side crashed so that java side can draw a sad tab. |