Commit 2677469c authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Android: Remove |InternalAccessDelegate.awakenScrollBars|

The method is used for ContentView only. Moved the logic to
ContentView, and deleted the interface from InternalAccessDelegate.

Bug: 598880
Change-Id: Ic07e2545b070e11d5653fd135d7396c65721cf71
Reviewed-on: https://chromium-review.googlesource.com/991620Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547846}
parent e5f13bd6
...@@ -2302,11 +2302,6 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate ...@@ -2302,11 +2302,6 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
} }
} }
@Override
public boolean super_awakenScrollBars(int arg0, boolean arg1) {
return false;
}
@Override @Override
public void onScrollChanged(int l, int t, int oldl, int oldt) { public void onScrollChanged(int l, int t, int oldl, int oldt) {
// Intentional no-op. // Intentional no-op.
......
...@@ -238,11 +238,6 @@ public class FullScreenView extends FrameLayout { ...@@ -238,11 +238,6 @@ public class FullScreenView extends FrameLayout {
+ "See AwContents#startActivityForResult"); + "See AwContents#startActivityForResult");
} }
@Override
public boolean super_awakenScrollBars(int startDelay, boolean invalidate) {
return FullScreenView.super.awakenScrollBars(startDelay, invalidate);
}
@Override @Override
public void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix) { public void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix) {
FullScreenView.this.onScrollChanged(lPix, tPix, oldlPix, oldtPix); FullScreenView.this.onScrollChanged(lPix, tPix, oldlPix, oldtPix);
......
...@@ -549,11 +549,6 @@ public class AwTestContainerView extends FrameLayout { ...@@ -549,11 +549,6 @@ public class AwTestContainerView extends FrameLayout {
AwTestContainerView.super.onScrollChanged(l, t, oldl, oldt); AwTestContainerView.super.onScrollChanged(l, t, oldl, oldt);
} }
@Override
public boolean super_awakenScrollBars(int startDelay, boolean invalidate) {
return AwTestContainerView.super.awakenScrollBars(startDelay, invalidate);
}
@Override @Override
public void setMeasuredDimension(int measuredWidth, int measuredHeight) { public void setMeasuredDimension(int measuredWidth, int measuredHeight) {
AwTestContainerView.super.setMeasuredDimension(measuredWidth, measuredHeight); AwTestContainerView.super.setMeasuredDimension(measuredWidth, measuredHeight);
......
...@@ -303,9 +303,11 @@ public class ContentView ...@@ -303,9 +303,11 @@ public class ContentView
@Override @Override
public boolean awakenScrollBars(int startDelay, boolean invalidate) { public boolean awakenScrollBars(int startDelay, boolean invalidate) {
ContentViewCore cvc = getContentViewCore(); // For the default implementation of ContentView which draws the scrollBars on the native
assert cvc != null; // side, calling this function may get us into a bad state where we keep drawing the
return cvc.awakenScrollBars(startDelay, invalidate); // scrollBars, so disable it by always returning false.
if (getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) return false;
return super.awakenScrollBars(startDelay, invalidate);
} }
@Override @Override
...@@ -358,11 +360,6 @@ public class ContentView ...@@ -358,11 +360,6 @@ public class ContentView
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
} }
@Override
public boolean super_awakenScrollBars(int startDelay, boolean invalidate) {
return super.awakenScrollBars(startDelay, invalidate);
}
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// End Implementation of ContentViewCore.InternalAccessDelegate // // End Implementation of ContentViewCore.InternalAccessDelegate //
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -13,7 +13,6 @@ import android.view.InputDevice; ...@@ -13,7 +13,6 @@ import android.view.InputDevice;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.Surface; import android.view.Surface;
import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import org.chromium.base.ObserverList; import org.chromium.base.ObserverList;
...@@ -579,19 +578,6 @@ public class ContentViewCoreImpl implements ContentViewCore, DisplayAndroidObser ...@@ -579,19 +578,6 @@ public class ContentViewCoreImpl implements ContentViewCore, DisplayAndroidObser
// End FrameLayout overrides. // End FrameLayout overrides.
@SuppressWarnings("javadoc")
@Override
public boolean awakenScrollBars(int startDelay, boolean invalidate) {
// For the default implementation of ContentView which draws the scrollBars on the native
// side, calling this function may get us into a bad state where we keep drawing the
// scrollBars, so disable it by always returning false.
if (mContainerView.getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) {
return false;
} else {
return mContainerViewInternals.super_awakenScrollBars(startDelay, invalidate);
}
}
@Override @Override
public void updateMultiTouchZoomSupport(boolean supportsMultiTouchZoom) { public void updateMultiTouchZoomSupport(boolean supportsMultiTouchZoom) {
if (mNativeContentViewCore == 0) return; if (mNativeContentViewCore == 0) return;
......
...@@ -80,11 +80,6 @@ public interface ContentViewCore { ...@@ -80,11 +80,6 @@ public interface ContentViewCore {
* @see View#onScrollChanged(int, int, int, int) * @see View#onScrollChanged(int, int, int, int)
*/ */
void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix); void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix);
/**
* @see View#awakenScrollBars(int, boolean)
*/
boolean super_awakenScrollBars(int startDelay, boolean invalidate);
} }
/** /**
...@@ -249,11 +244,6 @@ public interface ContentViewCore { ...@@ -249,11 +244,6 @@ public interface ContentViewCore {
*/ */
int computeVerticalScrollExtent(); int computeVerticalScrollExtent();
/**
* @see View#awakenScrollBars(int, boolean)
*/
boolean awakenScrollBars(int startDelay, boolean invalidate);
/** /**
* Enable or disable multi-touch zoom support. * Enable or disable multi-touch zoom support.
* @param supportsMultiTouchZoom {@code true} if the feature is enabled. * @param supportsMultiTouchZoom {@code true} if the feature is enabled.
......
...@@ -78,11 +78,6 @@ public class ContentViewScrollingTest { ...@@ -78,11 +78,6 @@ public class ContentViewScrollingTest {
} }
} }
@Override
public boolean super_awakenScrollBars(int startDelay, boolean invalidate) {
return false;
}
/** /**
* @return Whether OnScrollChanged() has been called. * @return Whether OnScrollChanged() has been called.
*/ */
......
...@@ -121,11 +121,6 @@ public class TestContentViewCore implements ContentViewCore { ...@@ -121,11 +121,6 @@ public class TestContentViewCore implements ContentViewCore {
return 0; return 0;
} }
@Override
public boolean awakenScrollBars(int startDelay, boolean invalidate) {
return false;
}
@Override @Override
public void updateMultiTouchZoomSupport(boolean supportsMultiTouchZoom) {} public void updateMultiTouchZoomSupport(boolean supportsMultiTouchZoom) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment