boolean removeTab(Tab t){
  if (t == null) {
    return false;
  }
  Tab current=getCurrentTab();
  mTabs.remove(t);
  mTabCountObservable.set(mTabs.size());
  if (t.isPrivateBrowsingEnabled()) {
    mNumIncognito-=1;
    if (mNumIncognito == 0) {
      GeolocationPermissions.onIncognitoTabsRemoved();
      Engine.destroyIncognitoProfile();
    }
  }
  if (current == t) {
    t.putInBackground();
    mCurrentTab=-1;
  }
 else {
    mCurrentTab=getTabPosition(current);
  }
  t.destroy();
  t.removeFromTree();
  mTabQueue.remove(t);
  return true;
}

boolean removeTab ( Tab t ) { if ( t == null ) { return false ; } Tab current = getCurrentTab ( ) ; mTabs . remove ( t ) ; mTabCountObservable . set ( mTabs . size ( ) ) ; if ( t . isPrivateBrowsingEnabled ( ) ) { mNumIncognito -= 1 ; if ( mNumIncognito == 0 ) { GeolocationPermissions . onIncognitoTabsRemoved ( ) ; Engine . destroyIncognitoProfile ( ) ; } } if ( current == t ) { t . putInBackground ( ) ; mCurrentTab = - 1 ; } else { mCurrentTab = getTabPosition ( current ) ; } t . destroy ( ) ; t . removeFromTree ( ) ; mTabQueue . remove ( t ) ; return true ; }
remove the tab from the list . if the tab is the current tab shown , the last created tab will be shown .
