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

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

Issue 2708703004: Reland "Refactor ContentViewClient (4/6)" (Closed)
Patch Set: - 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 d0bcd486ece4adf008e0e52c3139b536ddb9d1e6..1dba096e8b9bbaa63c56c68991832db8b1a5a8db 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
@@ -819,11 +819,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.
*/
@@ -1795,7 +1790,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) {
@@ -1810,8 +1804,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()
@@ -1827,8 +1819,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;
@@ -1842,12 +1832,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();
@@ -1866,15 +1853,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();
}
@@ -2293,11 +2271,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