B2G/gecko/browser/modules/WindowsPreviewPerTab.jsm
/*
 * This class monitors a browser window for changes to its tabs
 *
 * @param win
 *        The nsIDOMWindow browser window 
 */
This class monitors a browser window for changes to its tabs
@param win
The nsIDOMWindow browser window
This class monitors a browser window for changes to its tabs @param win The nsIDOMWindow browser window
function TabWindow(win) {
  this.win = win;
  this.tabbrowser = win.gBrowser;
  this.previews = [];
  for (let i = 0; i < this.tabEvents.length; i++)
    this.tabbrowser.tabContainer.addEventListener(this.tabEvents[i], this, false);
  this.tabbrowser.addTabsProgressListener(this);
  for (let i = 0; i < this.winEvents.length; i++)
    this.win.addEventListener(this.winEvents[i], this, false);
  AeroPeek.windows.push(this);
  let tabs = this.tabbrowser.tabs;
  for (let i = 0; i < tabs.length; i++)
    this.newTab(tabs[i]);
  this.updateTabOrdering();
  AeroPeek.checkPreviewCount();
}
function TabWindow ( win ) { this . win = win ; this . tabbrowser = win . gBrowser ; this . previews = [ ] ; for ( let i = 0 ; i < this . tabEvents . length ; i ++ ) this . tabbrowser . tabContainer . addEventListener ( this . tabEvents [ i ] , this , false ) ; this . tabbrowser . addTabsProgressListener ( this ) ; for ( let i = 0 ; i < this . winEvents . length ; i ++ ) this . win . addEventListener ( this . winEvents [ i ] , this , false ) ; AeroPeek . windows . push ( this ) ; let tabs = this . tabbrowser . tabs ; for ( let i = 0 ; i < tabs . length ; i ++ ) this . newTab ( tabs [ i ] ) ; this . updateTabOrdering ( ) ; AeroPeek . checkPreviewCount ( ) ; }
This class monitors a browser window for changes to its tabs
 @param win
        The nsIDOMWindow browser window
This class monitors a browser window for changes to its tabs @param win The nsIDOMWindow browser window