Chromium Code Reviews| 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 952f300d2e701811e9d720a2d1a3bea586a45b42..e6fc1f7a2de0a6835573285f4d2f8c1025ed2b22 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 |
| @@ -701,6 +701,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
| } |
| } |
| + /* TODO(jinsukkim): Remove this method once view delegate is accessible from embedder. */ |
| + public ViewAndroidDelegate getViewDelegate() { |
|
boliu
2016/11/30 23:22:35
should not need this, this is supplied by the embe
Jinsuk Kim
2016/12/01 07:59:38
It was added mostly for getDesiredMeasureSpec*() s
boliu
2016/12/01 23:57:52
For the test, you can just have Tab keep a ref, an
Jinsuk Kim
2016/12/02 03:52:07
Ah right that would do. Done.
|
| + return mViewAndroidDelegate; |
| + } |
| + |
| /** |
| * Sets a new container view for this {@link ContentViewCore}. |
| * |
| @@ -888,11 +893,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
| return mContentViewClient; |
| } |
| - @CalledByNative |
| - private void onBackgroundColorChanged(int color) { |
| - getContentViewClient().onBackgroundColorChanged(color); |
| - } |
| - |
| /** |
| * @return Viewport width in physical pixels as set from onSizeChanged. |
| */ |
| @@ -914,7 +914,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
| */ |
| @CalledByNative |
| public int getViewportHeightWithOSKHiddenPix() { |
| - return mViewportHeightPix + getContentViewClient().getSystemWindowInsetBottom(); |
| + return mViewportHeightPix + mViewAndroidDelegate.getSystemWindowInsetBottom(); |
|
boliu
2016/11/30 23:22:35
these moved calls should be RWHVA->ViewAndroid->Vi
Jinsuk Kim
2016/12/01 07:59:38
I also had tried so that VAD will handle |getViewp
|
| } |
| /** |
| @@ -1979,11 +1979,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
| if (topBarChanged) { |
| float topBarTranslate = topBarShownPix - browserControlsHeightDp * deviceScale; |
| - getContentViewClient().onTopControlsChanged(topBarTranslate, topBarShownPix); |
| + mViewAndroidDelegate.onTopControlsChanged(topBarTranslate, topBarShownPix); |
|
boliu
2016/11/30 23:22:35
how hard is it to go through ViewAndroid for these
Jinsuk Kim
2016/12/01 07:59:38
Not impossible but hard to do in one step. I'm afr
|
| } |
| if (bottomBarChanged) { |
| float bottomBarTranslate = bottomControlsHeightDp * deviceScale - bottomBarShownPix; |
| - getContentViewClient().onBottomControlsChanged(bottomBarTranslate, bottomBarShownPix); |
| + mViewAndroidDelegate.onBottomControlsChanged(bottomBarTranslate, bottomBarShownPix); |
| } |
| if (mBrowserAccessibilityManager != null) { |