michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMWindow; michael@0: michael@0: /** michael@0: * nsIBrowserGlue is a dirty and rather fluid interface to host shared utility michael@0: * methods used by browser UI code, but which are not local to a browser window. michael@0: * The component implementing this interface is meant to be a singleton michael@0: * (service) and should progressively replace some of the shared "glue" code michael@0: * scattered in browser/base/content (e.g. bits of utilOverlay.js, michael@0: * contentAreaUtils.js, globalOverlay.js, browser.js), avoiding dynamic michael@0: * inclusion and initialization of a ton of JS code for *each* window. michael@0: * Dued to its nature and origin, this interface won't probably be the most michael@0: * elegant or stable in the mozilla codebase, but its aim is rather pragmatic: michael@0: * 1) reducing the performance overhead which affects browser window load; michael@0: * 2) allow global hooks (e.g. startup and shutdown observers) which survive michael@0: * browser windows to accomplish browser-related activities, such as shutdown michael@0: * sanitization (see bug #284086) michael@0: * michael@0: */ michael@0: michael@0: [scriptable, uuid(781df699-17dc-4237-b3d7-876ddb7085e3)] michael@0: interface nsIBrowserGlue : nsISupports michael@0: { michael@0: /** michael@0: * Deletes privacy sensitive data according to user preferences michael@0: * michael@0: * @param aParentWindow an optionally null window which is the parent of the michael@0: * sanitization dialog michael@0: * michael@0: */ michael@0: void sanitize(in nsIDOMWindow aParentWindow); michael@0: michael@0: /** michael@0: * Add Smart Bookmarks special queries to bookmarks menu and toolbar folder. michael@0: */ michael@0: void ensurePlacesDefaultQueriesInitialized(); michael@0: michael@0: /** michael@0: * Gets the most recent window that's a browser (but not a popup) michael@0: */ michael@0: nsIDOMWindow getMostRecentBrowserWindow(); michael@0: };