Commit c120ca1d authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Remove unused independent animation from LayoutTab

This patch reomves some obsolete code that was used to transition
theme colors on the tab border in the tab switcher. This feature
has since been removed.

Bug: 882508
Change-Id: Ie63fabb08631f0377721f7057cbe65a4cd3af9a2
Reviewed-on: https://chromium-review.googlesource.com/1217405Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590488}
parent 959392bb
...@@ -852,16 +852,7 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene ...@@ -852,16 +852,7 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene
} }
} }
// LayoutTabs may be running their own animations; make sure they are done. This should if (!finished) requestUpdate();
// not block the completion state of the layout animations in general. Particularly, a tab
// could be driving theme changes (and therefore fade animations) that are not critical to
// the browser's UI. https://crbug.com/627066
boolean layoutTabsFinished = true;
for (int i = 0; mLayoutTabs != null && i < mLayoutTabs.length; i++) {
layoutTabsFinished &= mLayoutTabs[i].onUpdateAnimation(time);
}
if (!finished || !layoutTabsFinished) requestUpdate();
return finished; return finished;
} }
......
...@@ -125,11 +125,6 @@ public class LayoutTab implements ChromeAnimation.Animatable { ...@@ -125,11 +125,6 @@ public class LayoutTab implements ChromeAnimation.Animatable {
*/ */
private boolean mInitFromHostCalled; private boolean mInitFromHostCalled;
/** The animation set specific to this LayoutTab. */
private ChromeAnimation<ChromeAnimation.Animatable> mCurrentAnimations;
private int mInitialThemeColor;
private int mFinalThemeColor;
// All the members bellow are initialized from the delayed initialization. // All the members bellow are initialized from the delayed initialization.
// //
// Begin section -------------- // Begin section --------------
...@@ -241,15 +236,6 @@ public class LayoutTab implements ChromeAnimation.Animatable { ...@@ -241,15 +236,6 @@ public class LayoutTab implements ChromeAnimation.Animatable {
return needsUpdate; return needsUpdate;
} }
/**
* Update any animation controlled by this object.
* @param time The current app time in ms.
* @return Whether the animations controlled by this LayoutTab are finished.
*/
public boolean onUpdateAnimation(long time) {
return mCurrentAnimations == null ? true : mCurrentAnimations.update(time);
}
/** /**
* @return Whether {@link #initFromHost} needs to be called on this {@link LayoutTab}. * @return Whether {@link #initFromHost} needs to be called on this {@link LayoutTab}.
*/ */
...@@ -796,7 +782,6 @@ public class LayoutTab implements ChromeAnimation.Animatable { ...@@ -796,7 +782,6 @@ public class LayoutTab implements ChromeAnimation.Animatable {
* @param visible True if the {@link LayoutTab} is visible and need to be drawn. * @param visible True if the {@link LayoutTab} is visible and need to be drawn.
*/ */
public void setVisible(boolean visible) { public void setVisible(boolean visible) {
if (!visible && mCurrentAnimations != null) mCurrentAnimations.updateAndFinish();
mVisible = visible; mVisible = visible;
} }
...@@ -995,9 +980,6 @@ public class LayoutTab implements ChromeAnimation.Animatable { ...@@ -995,9 +980,6 @@ public class LayoutTab implements ChromeAnimation.Animatable {
@Override @Override
public void onPropertyAnimationFinished(@Property int prop) { public void onPropertyAnimationFinished(@Property int prop) {
if (mCurrentAnimations != null && mCurrentAnimations.finished()) {
mCurrentAnimations = null;
}
} }
public static final FloatProperty<LayoutTab> ALPHA = new FloatProperty<LayoutTab>("ALPHA") { public static final FloatProperty<LayoutTab> ALPHA = new FloatProperty<LayoutTab>("ALPHA") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment