rem: this._hist = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService);  this._ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService);  this._strings = document.getElementById("placeBundle");   BookmarksUtils.addLivemark = function(a,b,c,d) {PlacesBrowserShim.addLivemark(a,b,c,d);};  var newMenuPopup = document.getElementById("bookmarksMenuPopup"); var query = this._hist.getNewQuery(); query.setFolders([this._bms.bookmarksRoot], 1); var options = this._hist.getNewQueryOptions(); options.setGroupingMode([Ci.nsINavHistoryQueryOptions.GROUP_BY_FOLDER], 1); options.expandQueries = true; var result = this._hist.executeQuery(query, options); newMenuPopup._result = result; newMenuPopup._resultNode = result.root;  this._registerEventHandlers();  window.controllers.appendController(PlacesController);  PlacesController.topWindow = window; PlacesController.tm = PlacesTransactionManager; }, 
add:  BookmarksUtils.addLivemark = function(a,b,c,d) {PlacesBrowserShim.addLivemark(a,b,c,d);};  var newMenuPopup = document.getElementById("bookmarksMenuPopup"); newMenuPopup.folderId = this._bms.bookmarksRoot; }; 
context:   init: function PBS_init() {    var addBookmarkCmd = document.getElementById("Browser:AddBookmarkAs");    addBookmarkCmd.setAttribute("oncommand", "PlacesBrowserShim.addBookmark()");    this._bms =    Cc["@mozilla.org/browser/nav-bookmarks-service;1"].    getService(Ci.nsINavBookmarksService);    this._lms =    Cc["@mozilla.org/browser/livemark-service;1"].    getService(Ci.nsILivemarkService);    this._hist =    Cc["@mozilla.org/browser/nav-history-service;1"].    getService(Ci.nsINavHistoryService);    this._ios =    Cc["@mozilla.org/network/io-service;1"].    getService(Ci.nsIIOService);    this._strings = document.getElementById("placeBundle");    // Override the old addLivemark function    BookmarksUtils.addLivemark = function(a,b,c,d) {PlacesBrowserShim.addLivemark(a,b,c,d);};    var newMenuPopup = document.getElementById("bookmarksMenuPopup");    var query = this._hist.getNewQuery();    query.setFolders([this._bms.bookmarksRoot], 1);    var options = this._hist.getNewQueryOptions();    options.setGroupingMode([Ci.nsINavHistoryQueryOptions.GROUP_BY_FOLDER], 1);    options.expandQueries = true;    var result = this._hist.executeQuery(query, options);    newMenuPopup._result = result;    newMenuPopup._resultNode = result.root;    this._registerEventHandlers();    window.controllers.appendController(PlacesController);    PlacesController.topWindow = window;    PlacesController.tm = PlacesTransactionManager;  },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/2dcdad0e1c19c8878d15ffd57d17e08117d25092/browserShim.js/clean/browser/components/places/content-shim/browserShim.js