Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 2708703004: Reland "Refactor ContentViewClient (4/6)" (Closed)
Patch Set: rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ac344ebd880ab5e029d27181c307bb5f1d7286c1..b25e034997b815b6775111455a91abec0cfc3e4d 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
@@ -827,11 +827,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.
*/
@@ -1806,7 +1801,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
float minPageScaleFactor, float maxPageScaleFactor, float contentWidth,
float contentHeight, float viewportWidth, float viewportHeight,
float browserControlsHeightDp, float browserControlsShownRatio,
- float bottomControlsHeightDp, float bottomControlsShownRatio,
boolean isMobileOptimizedHint, boolean hasInsertionMarker,
boolean isInsertionMarkerVisible, float insertionMarkerHorizontal,
float insertionMarkerTop, float insertionMarkerBottom) {
@@ -1821,8 +1815,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
mViewportHeightPix / (deviceScale * pageScaleFactor));
final float topBarShownPix =
browserControlsHeightDp * deviceScale * browserControlsShownRatio;
- final float bottomBarShownPix = bottomControlsHeightDp * deviceScale
- * bottomControlsShownRatio;
final boolean contentSizeChanged =
contentWidth != mRenderCoordinates.getContentWidthCss()
@@ -1838,8 +1830,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
|| scrollOffsetY != mRenderCoordinates.getScrollY();
final boolean topBarChanged = Float.compare(topBarShownPix,
mRenderCoordinates.getContentOffsetYPix()) != 0;
- final boolean bottomBarChanged = Float.compare(bottomBarShownPix, mRenderCoordinates
- .getContentOffsetYPixBottom()) != 0;
final boolean needHidePopupZoomer = contentSizeChanged || scrollChanged;
@@ -1853,12 +1843,9 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
(int) mRenderCoordinates.getScrollYPix());
}
- mRenderCoordinates.updateFrameInfo(
- scrollOffsetX, scrollOffsetY,
- contentWidth, contentHeight,
- viewportWidth, viewportHeight,
- pageScaleFactor, minPageScaleFactor, maxPageScaleFactor,
- topBarShownPix, bottomBarShownPix);
+ mRenderCoordinates.updateFrameInfo(scrollOffsetX, scrollOffsetY, contentWidth,
+ contentHeight, viewportWidth, viewportHeight, pageScaleFactor, minPageScaleFactor,
+ maxPageScaleFactor, topBarShownPix);
if (scrollChanged || topBarChanged) {
for (mGestureStateListenersIterator.rewind();
@@ -1877,15 +1864,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
}
}
- if (topBarChanged) {
- float topBarTranslate = topBarShownPix - browserControlsHeightDp * deviceScale;
- getContentViewClient().onTopControlsChanged(topBarTranslate, topBarShownPix);
- }
- if (bottomBarChanged) {
- float bottomBarTranslate = bottomControlsHeightDp * deviceScale - bottomBarShownPix;
- getContentViewClient().onBottomControlsChanged(bottomBarTranslate, bottomBarShownPix);
- }
-
if (mBrowserAccessibilityManager != null) {
mBrowserAccessibilityManager.notifyFrameInfoInitialized();
}
@@ -2304,11 +2282,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
return mRenderCoordinates.getPageScaleFactor();
}
- @CalledByNative
- private void startContentIntent(String contentUrl, boolean isMainFrame) {
- getContentViewClient().onStartContentIntent(getContext(), contentUrl, isMainFrame);
- }
-
@Override
public void onAccessibilityStateChanged(boolean enabled) {
setAccessibilityState(enabled);

Powered by Google App Engine
This is Rietveld 408576698