browser/components/nsIBrowserGlue.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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)
    23  *
    24  */ 
    26 [scriptable, uuid(781df699-17dc-4237-b3d7-876ddb7085e3)]
    27 interface nsIBrowserGlue : nsISupports
    28 {
    29   /** 
    30    * Deletes privacy sensitive data according to user preferences
    31    *
    32    * @param aParentWindow an optionally null window which is the parent of the 
    33    *        sanitization dialog
    34    *
    35    */
    36   void sanitize(in nsIDOMWindow aParentWindow);
    38   /**
    39    * Add Smart Bookmarks special queries to bookmarks menu and toolbar folder.
    40    */
    41   void ensurePlacesDefaultQueriesInitialized();
    43   /**
    44    * Gets the most recent window that's a browser (but not a popup)
    45    */
    46   nsIDOMWindow getMostRecentBrowserWindow();
    47 };

mercurial