Bug 886842 - Add clang trunk builds for ASan. r=froydnj
[gecko.git] / browser / components / nsIBrowserGlue.idl
blob1bb82a9d23ac28408b1324bb4d72952ee5c92bd5
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface nsIDOMWindow;
9 /**
10 * nsIBrowserGlue is a dirty and rather fluid interface to host shared utility
11 * methods used by browser UI code, but which are not local to a browser window.
12 * The component implementing this interface is meant to be a singleton
13 * (service) and should progressively replace some of the shared "glue" code
14 * scattered in browser/base/content (e.g. bits of utilOverlay.js,
15 * contentAreaUtils.js, globalOverlay.js, browser.js), avoiding dynamic
16 * inclusion and initialization of a ton of JS code for *each* window.
17 * Dued to its nature and origin, this interface won't probably be the most
18 * elegant or stable in the mozilla codebase, but its aim is rather pragmatic:
19 * 1) reducing the performance overhead which affects browser window load;
20 * 2) allow global hooks (e.g. startup and shutdown observers) which survive
21 * browser windows to accomplish browser-related activities, such as shutdown
22 * sanitization (see bug #284086)
24 */
26 [scriptable, uuid(781df699-17dc-4237-b3d7-876ddb7085e3)]
27 interface nsIBrowserGlue : nsISupports
29 /**
30 * Deletes privacy sensitive data according to user preferences
32 * @param aParentWindow an optionally null window which is the parent of the
33 * sanitization dialog
36 void sanitize(in nsIDOMWindow aParentWindow);
38 /**
39 * Add Smart Bookmarks special queries to bookmarks menu and toolbar folder.
41 void ensurePlacesDefaultQueriesInitialized();
43 /**
44 * Gets the most recent window that's a browser (but not a popup)
46 nsIDOMWindow getMostRecentBrowserWindow();