diff options
author | aurimas <aurimas@chromium.org> | 2014-09-02 15:20:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-02 22:42:07 +0000 |
commit | a5f8ead45f469cb046403b250272b855de9fbba3 (patch) | |
tree | 1295a1ebdd5c15c62a9ec24de927f4e654ef7c25 /content | |
parent | 3d9a246947c3a01ca075a4c7eca4cda4259a4939 (diff) | |
download | chromium_src-a5f8ead45f469cb046403b250272b855de9fbba3.zip chromium_src-a5f8ead45f469cb046403b250272b855de9fbba3.tar.gz chromium_src-a5f8ead45f469cb046403b250272b855de9fbba3.tar.bz2 |
[Android] Add missing @VisibleForTesting annotations.
Proguard strips these methods if they are not annotated because they
are only used in tests.
TBR=brettw
BUG=163393
Review URL: https://codereview.chromium.org/528963003
Cr-Commit-Position: refs/heads/master@{#293009}
Diffstat (limited to 'content')
-rw-r--r-- | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java | 12 |
1 files changed, 10 insertions, 2 deletions
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 c1fe639..f03692f 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 @@ -47,8 +47,6 @@ import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; -import com.google.common.annotations.VisibleForTesting; - import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.CalledByNative; import org.chromium.base.CommandLine; @@ -56,6 +54,7 @@ import org.chromium.base.JNINamespace; import org.chromium.base.ObserverList; import org.chromium.base.ObserverList.RewindableIterator; import org.chromium.base.TraceEvent; +import org.chromium.base.VisibleForTesting; import org.chromium.content.R; import org.chromium.content.browser.ScreenOrientationListener.ScreenOrientationObserver; import org.chromium.content.browser.accessibility.AccessibilityInjector; @@ -947,7 +946,9 @@ public class ContentViewCore public int getPhysicalBackingHeightPix() { return mPhysicalBackingHeightPix; } /* TODO(aelias): Remove these when downstream callers disappear. */ + @VisibleForTesting public int getViewportSizeOffsetWidthPix() { return 0; } + @VisibleForTesting public int getViewportSizeOffsetHeightPix() { return getTopControlsLayoutHeightPix(); } /** @@ -1000,6 +1001,7 @@ public class ContentViewCore * of bounds. * @param offset The offset into the navigation history. */ + @VisibleForTesting public void goToOffset(int offset) { if (mWebContents != null) mWebContents.getNavigationController().goToOffset(offset); } @@ -1421,6 +1423,7 @@ public class ContentViewCore * @return The ID of the renderer process that backs this tab or * {@link #INVALID_RENDER_PROCESS_PID} if there is none. */ + @VisibleForTesting public int getCurrentRenderProcessId() { return nativeGetCurrentRenderProcessId(mNativeContentViewCore); } @@ -2385,14 +2388,17 @@ public class ContentViewCore private PopupTouchHandleDrawable createPopupTouchHandleDrawable() { if (mTouchHandleDelegate == null) { mTouchHandleDelegate = new PopupTouchHandleDrawableDelegate() { + @Override public View getParent() { return getContainerView(); } + @Override public PositionObserver getParentPositionObserver() { return mPositionObserver; } + @Override public boolean onTouchHandleEvent(MotionEvent event) { final boolean isTouchHandleEvent = true; return onTouchEventImpl(event, isTouchHandleEvent); @@ -2432,6 +2438,7 @@ public class ContentViewCore if (mPastePopupMenu == null) { mPastePopupMenu = new PastePopupMenu(getContainerView(), new PastePopupMenuDelegate() { + @Override public void paste() { mImeAdapter.paste(); hideTextHandles(); @@ -2675,6 +2682,7 @@ public class ContentViewCore * Return the current scale of the ContentView. * @return The current page scale factor. */ + @VisibleForTesting public float getScale() { return mRenderCoordinates.getPageScaleFactor(); } |