@Override public void onTabClosed(long time,int id,int nextId,boolean incognito){
  super.onTabClosed(time,id,nextId,incognito);
  if (mClosedTab != null) {
    TabModel nextModel=mTabModelSelector.getModelForTabId(nextId);
    if (nextModel != null) {
      LayoutTab nextLayoutTab=createLayoutTab(nextId,nextModel.isIncognito(),NO_CLOSE_BUTTON,NO_TITLE);
      nextLayoutTab.setDrawDecoration(false);
      mLayoutTabs=new LayoutTab[]{nextLayoutTab,mClosedTab};
      updateCacheVisibleIds(new LinkedList<Integer>(Arrays.asList(nextId,mClosedTab.getId())));
    }
 else {
      mLayoutTabs=new LayoutTab[]{mClosedTab};
    }
    forceAnimationToFinish();
    mAnimatedTab=mClosedTab;
    addToAnimation(this,Property.DISCARD_AMOUNT,0,getDiscardRange(),TAB_CLOSED_ANIMATION_DURATION,0,false,BakedBezierInterpolator.FADE_OUT_CURVE);
    mClosedTab=null;
    if (nextModel != null) {
      mTabModelSelector.selectModel(nextModel.isIncognito());
    }
  }
  startHiding(nextId,false);
}

@ Override public void onTabClosed ( long time , int id , int nextId , boolean incognito ) { super . onTabClosed ( time , id , nextId , incognito ) ; if ( mClosedTab != null ) { TabModel nextModel = mTabModelSelector . getModelForTabId ( nextId ) ; if ( nextModel != null ) { LayoutTab nextLayoutTab = createLayoutTab ( nextId , nextModel . isIncognito ( ) , NO_CLOSE_BUTTON , NO_TITLE ) ; nextLayoutTab . setDrawDecoration ( false ) ; mLayoutTabs = new LayoutTab [ ] { nextLayoutTab , mClosedTab } ; updateCacheVisibleIds ( new LinkedList < Integer > ( Arrays . asList ( nextId , mClosedTab . getId ( ) ) ) ) ; } else { mLayoutTabs = new LayoutTab [ ] { mClosedTab } ; } forceAnimationToFinish ( ) ; mAnimatedTab = mClosedTab ; addToAnimation ( this , Property . DISCARD_AMOUNT , 0 , getDiscardRange ( ) , TAB_CLOSED_ANIMATION_DURATION , 0 , false , BakedBezierInterpolator . FADE_OUT_CURVE ) ; mClosedTab = null ; if ( nextModel != null ) { mTabModelSelector . selectModel ( nextModel . isIncognito ( ) ) ; } } startHiding ( nextId , false ) ; }
animate the closing of a tab
