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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java

Issue 2022183005: Android: Call SetNeedsAnimate() for toolbar animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
index 3a35fb416a540fdde3f8dabc59749e4aa49ebe45..2cb5801850d51349173061361a29cf01e32aa950 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
@@ -105,8 +105,9 @@ public class ChromeFullscreenManager
/**
* Called whenever the content's visible offset changes.
* @param offset The new offset of the visible content from the top of the screen.
+ * @param needsAnimate Whether the caller is driving an animation with further updates.
Ted C 2016/05/31 22:25:46 Hmm...this name seems odd to me (or maybe too spec
*/
- public void onVisibleContentOffsetChanged(float offset);
+ public void onVisibleContentOffsetChanged(float offset, boolean needsAnimate);
/**
* Called when a ContentVideoView is created/destroyed.
@@ -502,8 +503,12 @@ public class ChromeFullscreenManager
mControlContainer.getView().setTranslationY(getControlOffset());
}
+ // Whether we need the compositor to draw again to update our animation.
+ // Should be |false| when the top controls are only moved through the page scrolling.
+ boolean needsAnimate = mControlAnimation != null || shouldShowAndroidControls();
for (int i = 0; i < mListeners.size(); i++) {
- mListeners.get(i).onVisibleContentOffsetChanged(getVisibleContentOffset());
+ mListeners.get(i).onVisibleContentOffsetChanged(
+ getVisibleContentOffset(), needsAnimate);
}
}

Powered by Google App Engine
This is Rietveld 408576698