| 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 9733a58784af0c70ff24a72caa08e94a4c75e899..970c8877bff5d5427a42226446831cdb7a8d34aa 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
|
| @@ -906,7 +906,8 @@ public class ContentViewCore
|
| * Stops loading the current web contents.
|
| */
|
| public void stopLoading() {
|
| - if (mWebContents != null) mWebContents.stop();
|
| + assert mWebContents != null;
|
| + mWebContents.stop();
|
| }
|
|
|
| /**
|
| @@ -915,8 +916,8 @@ public class ContentViewCore
|
| * @return The URL of the current page.
|
| */
|
| public String getUrl() {
|
| - if (mNativeContentViewCore != 0) return nativeGetURL(mNativeContentViewCore);
|
| - return null;
|
| + assert mWebContents != null;
|
| + return mWebContents.getUrl();
|
| }
|
|
|
| /**
|
| @@ -925,7 +926,8 @@ public class ContentViewCore
|
| * @return The title of the current page.
|
| */
|
| public String getTitle() {
|
| - return mWebContents == null ? null : mWebContents.getTitle();
|
| + assert mWebContents != null;
|
| + return mWebContents.getTitle();
|
| }
|
|
|
| /**
|
| @@ -2004,9 +2006,8 @@ public class ContentViewCore
|
| }
|
|
|
| public void selectPopupMenuItems(int[] indices) {
|
| - if (mNativeContentViewCore != 0) {
|
| - nativeSelectPopupMenuItems(mNativeContentViewCore, indices);
|
| - }
|
| + assert mWebContents != null;
|
| + mWebContents.selectPopupMenuItems(indices);
|
| mSelectPopup = null;
|
| }
|
|
|
| @@ -2152,9 +2153,10 @@ public class ContentViewCore
|
| mActionMode = null;
|
| // On ICS, startActionMode throws an NPE when getParent() is null.
|
| if (mContainerView.getParent() != null) {
|
| + assert mWebContents != null;
|
| mActionMode = mContainerView.startActionMode(
|
| getContentViewClient().getSelectActionModeCallback(getContext(), actionHandler,
|
| - nativeIsIncognito(mNativeContentViewCore)));
|
| + mWebContents.isIncognito()));
|
| }
|
| mUnselectAllOnActionModeDismiss = true;
|
| if (mActionMode == null) {
|
| @@ -3080,8 +3082,8 @@ public class ContentViewCore
|
|
|
| @VisibleForTesting
|
| void setHasPendingNavigationTransitionForTesting() {
|
| - if (mNativeContentViewCore == 0) return;
|
| - nativeSetHasPendingNavigationTransitionForTesting(mNativeContentViewCore);
|
| + assert mWebContents != null;
|
| + mWebContents.setHasPendingNavigationTransitionForTesting();
|
| }
|
|
|
| public void setNavigationTransitionDelegate(NavigationTransitionDelegate delegate) {
|
| @@ -3150,8 +3152,8 @@ public class ContentViewCore
|
| }
|
|
|
| public void resumeResponseDeferredAtStart() {
|
| - if (mNativeContentViewCore == 0) return;
|
| - nativeResumeResponseDeferredAtStart(mNativeContentViewCore);
|
| + assert mWebContents != null;
|
| + mWebContents.resumeResponseDeferredAtStart();
|
| }
|
|
|
| /**
|
| @@ -3186,10 +3188,6 @@ public class ContentViewCore
|
| boolean canLoadLocalResources,
|
| boolean isRendererInitiated);
|
|
|
| - private native String nativeGetURL(long nativeContentViewCoreImpl);
|
| -
|
| - private native boolean nativeIsIncognito(long nativeContentViewCoreImpl);
|
| -
|
| private native void nativeSetFocus(long nativeContentViewCoreImpl, boolean focused);
|
|
|
| private native void nativeSendOrientationChangeEvent(
|
| @@ -3257,7 +3255,6 @@ public class ContentViewCore
|
| private native void nativeSetMultiTouchZoomSupportEnabled(
|
| long nativeContentViewCoreImpl, boolean enabled);
|
|
|
| - private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl, int[] indices);
|
|
|
| private native void nativeClearHistory(long nativeContentViewCoreImpl);
|
|
|
| @@ -3301,8 +3298,4 @@ public class ContentViewCore
|
| int x, int y, int w, int h);
|
| private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl, boolean opaque);
|
|
|
| - private native void nativeResumeResponseDeferredAtStart(
|
| - long nativeContentViewCoreImpl);
|
| - private native void nativeSetHasPendingNavigationTransitionForTesting(
|
| - long nativeContentViewCoreImpl);
|
| }
|
|
|