third_party/js/mozmill/shared-modules/private-browsing.js
function privateBrowsing(controller) {
  this._controller = controller;
  this._handler = null;

  /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */
  this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
  this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");

  this.__defineGetter__('_pbs', function() {
    delete this._pbs;
    return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
                       getService(Ci.nsIPrivateBrowsingService);
  });
}
function privateBrowsing(controller) {
  this._controller = controller;
  this._handler = null;

  /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */
  this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
  this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");

  this.__defineGetter__('_pbs', function() {
    delete this._pbs;
    return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
                       getService(Ci.nsIPrivateBrowsingService);
  });
}
function privateBrowsing ( controller ) { this . _controller = controller ; this . _handler = null ; /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */ this . _pbMenuItem = new elementslib . Elem ( this . _controller . menus [ 'tools-menu' ] . privateBrowsingItem ) ; this . _pbTransitionItem = new elementslib . ID ( this . _controller . window . document , "Tools:PrivateBrowsing" ) ; this . __defineGetter__ ( '_pbs' , function ( ) { delete this . _pbs ; return this . _pbs = Cc [ "@mozilla.org/privatebrowsing;1" ] . getService ( Ci . nsIPrivateBrowsingService ) ; } ) ; }
Create a new privateBrowsing instance.

@class This class adds support for the Private Browsing mode
@param {MozMillController} controller
MozMillController to use for the modal entry dialog
Create a new privateBrowsing instance .