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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java

Issue 2900463002: [Home] Add some NTP UI polish (Closed)
Patch Set: Created 3 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/compositor/layouts/phone/SimpleAnimationLayout.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java
index 4d19153015843b4517bdb345deff02118c0fd098..f37e822b6893fc8daa0c19f7fd943a4ec1f481f1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java
@@ -69,12 +69,13 @@ public class SimpleAnimationLayout
private final TabListSceneLayer mSceneLayer;
private final BlackHoleEventFilter mBlackHoleEventFilter;
+ private boolean mForegroundTabCreationAnimationDisabled;
+
/**
* Creates an instance of the {@link SimpleAnimationLayout}.
* @param context The current Android's context.
* @param updateHost The {@link LayoutUpdateHost} view for this layout.
* @param renderHost The {@link LayoutRenderHost} view for this layout.
- * @param eventFilter The {@link EventFilter} that is needed for this view.
*/
public SimpleAnimationLayout(
Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost) {
@@ -196,6 +197,8 @@ public class SimpleAnimationLayout
mTabModelSelector.selectModel(newIsIncognito);
startHiding(id, false);
+
+ if (mForegroundTabCreationAnimationDisabled) forceAnimationToFinish();
}
/**
@@ -430,4 +433,13 @@ public class SimpleAnimationLayout
mSceneLayer.pushLayers(getContext(), contentViewport, contentViewport, this,
layerTitleCache, tabContentManager, resourceManager, fullscreenManager);
}
+
+ /**
+ * Sets whether the foreground tab animation is disabled.
+ * TODO(twellington): Remove this after Chrome Home NTP animations are complete.
+ * @param disabled Whether the foreground tab animation should be disabled.
+ */
+ public void setForegroundTabAnimationDisabled(boolean disabled) {
+ mForegroundTabCreationAnimationDisabled = disabled;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698