nsIBrowserGlue.idl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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/. */
  4. #include "nsISupports.idl"
  5. interface nsIDOMWindow;
  6. /**
  7. * nsIBrowserGlue is a dirty and rather fluid interface to host shared utility
  8. * methods used by browser UI code, but which are not local to a browser window.
  9. * The component implementing this interface is meant to be a singleton
  10. * (service) and should progressively replace some of the shared "glue" code
  11. * scattered in browser/base/content (e.g. bits of utilOverlay.js,
  12. * contentAreaUtils.js, globalOverlay.js, browser.js), avoiding dynamic
  13. * inclusion and initialization of a ton of JS code for *each* window.
  14. * Dued to its nature and origin, this interface won't probably be the most
  15. * elegant or stable in the mozilla codebase, but its aim is rather pragmatic:
  16. * 1) reducing the performance overhead which affects browser window load;
  17. * 2) allow global hooks (e.g. startup and shutdown observers) which survive
  18. * browser windows to accomplish browser-related activities, such as shutdown
  19. * sanitization (see bug #284086)
  20. *
  21. */
  22. [scriptable, uuid(781df699-17dc-4237-b3d7-876ddb7085e3)]
  23. interface nsIBrowserGlue : nsISupports
  24. {
  25. /**
  26. * Deletes privacy sensitive data according to user preferences
  27. *
  28. * @param aParentWindow an optionally null window which is the parent of the
  29. * sanitization dialog
  30. *
  31. */
  32. void sanitize(in nsIDOMWindow aParentWindow);
  33. /**
  34. * Add Smart Bookmarks special queries to bookmarks menu and toolbar folder.
  35. */
  36. void ensurePlacesDefaultQueriesInitialized();
  37. /**
  38. * Gets the most recent window that's a browser (but not a popup)
  39. */
  40. nsIDOMWindow getMostRecentBrowserWindow();
  41. };