suite/components/nsISuiteGlue.idl
author Rob Lemley <rob@thunderbird.net>
Wed, 08 Apr 2020 18:29:48 -0400
changeset 38748 6d4c1e45518002fd062d717ccaa226fa9350d34c
parent 34023 5725e65df3d5e403d67a61a10bfe9cbe1f60debf
permissions -rw-r--r--
Bug 1621787 - Additional license notice for Bzip2. r=kaie Bzip2 sources will be added to third_party/bzip2. This is the license text from the current version.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface nsIDOMWindow;

/**
 * ***** this is the suite version of nsIBrowserGlue *****
 * nsISuiteGlue is a dirty and rather fluid interface to host shared utility
 * methods used by suite UI code, but which are not local to a suite window.
 * The component implementing this interface is meant to be a singleton
 * (service) and should progressively replace some of the shared "glue" code
 * scattered in suite/ (e.g. bits of utilOverlay.js,
 * contentAreaUtils.js, globalOverlay.js), avoiding dynamic
 * inclusion and initialization of a ton of JS code for *each* window.
 * Due to its nature and origin, this interface won't probably be the most
 * elegant or stable in the mozilla codebase, but its aim is rather pragmatic:
 * 1) reducing the performance overhead which affects browser window load;
 * 2) allow global hooks (e.g. startup and shutdown observers) which survive
 * suite windows to accomplish suite-related activities, such as shutdown
 * sanitization (see bug #284086)
 */

[scriptable, uuid(b3a787fd-4c05-4518-98e3-20bc10a0f586)]
interface nsISuiteGlue : nsISupports
{
  /**
   * Opens the Download Manager.
   */
  void showDownloadManager( [optional] in boolean newDownload );

  /**
   * Deletes privacy sensitive data according to user preferences
   *
   * @param aParentWindow an optionally null window which is the parent of the
   *        sanitization dialog (if it has to be shown per user preferences)
   *
   */
  void sanitize(in nsIDOMWindow aParentWindow);
};