1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/nsIBrowserGlue.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIDOMWindow; 1.11 + 1.12 +/** 1.13 + * nsIBrowserGlue is a dirty and rather fluid interface to host shared utility 1.14 + * methods used by browser UI code, but which are not local to a browser window. 1.15 + * The component implementing this interface is meant to be a singleton 1.16 + * (service) and should progressively replace some of the shared "glue" code 1.17 + * scattered in browser/base/content (e.g. bits of utilOverlay.js, 1.18 + * contentAreaUtils.js, globalOverlay.js, browser.js), avoiding dynamic 1.19 + * inclusion and initialization of a ton of JS code for *each* window. 1.20 + * Dued to its nature and origin, this interface won't probably be the most 1.21 + * elegant or stable in the mozilla codebase, but its aim is rather pragmatic: 1.22 + * 1) reducing the performance overhead which affects browser window load; 1.23 + * 2) allow global hooks (e.g. startup and shutdown observers) which survive 1.24 + * browser windows to accomplish browser-related activities, such as shutdown 1.25 + * sanitization (see bug #284086) 1.26 + * 1.27 + */ 1.28 + 1.29 +[scriptable, uuid(781df699-17dc-4237-b3d7-876ddb7085e3)] 1.30 +interface nsIBrowserGlue : nsISupports 1.31 +{ 1.32 + /** 1.33 + * Deletes privacy sensitive data according to user preferences 1.34 + * 1.35 + * @param aParentWindow an optionally null window which is the parent of the 1.36 + * sanitization dialog 1.37 + * 1.38 + */ 1.39 + void sanitize(in nsIDOMWindow aParentWindow); 1.40 + 1.41 + /** 1.42 + * Add Smart Bookmarks special queries to bookmarks menu and toolbar folder. 1.43 + */ 1.44 + void ensurePlacesDefaultQueriesInitialized(); 1.45 + 1.46 + /** 1.47 + * Gets the most recent window that's a browser (but not a popup) 1.48 + */ 1.49 + nsIDOMWindow getMostRecentBrowserWindow(); 1.50 +};