DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (7067896c7696)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
/* 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"

/**
 * Observer for skip list updates.
 */
[scriptable, function, uuid(f7c918e5-94bf-4b6e-9758-ef7bdab6af7e)]
interface nsIUrlClassifierSkipListObserver : nsISupports
{
  /**
   * Called by nsIUrlClassifierSkipListService when the skip list
   * for a designated feature changes and when the observer is first registered.
   *
   * @param aList
   *        A comma-separated list of url patterns, intended to be parsed
   *        by nsContentUtils::IsURIInList.
   */
  void onSkipListUpdate(in ACString aList);
};

/**
 * A service that monitors updates to the skip list of url-classifier
 * feature from sources such as a local pref and remote settings updates.
 */
[scriptable, uuid(75c3d1a3-e977-4079-9e27-b3b56bdb76ea)]
interface nsIUrlClassifierSkipListService : nsISupports
{
  /**
   * Register a new observer to skip list updates. When the observer is
   * registered it is called immediately once. Afterwards it will be called
   * whenever the specified pref changes or when remote settings for
   * url-classifier features updates.
   *
   * @param aFeature
   *        The feature for which to observe the skip list.
   *
   * @param aPrefName
   *        (Optional) A pref name to monitor. The pref must be of string
   *        type and contain a comma-separated list of URL patterns.
   *
   * @param aObserver
   *        An nsIUrlClassifierSkipListObserver object or function that
   *        will receive updates to the skip list as a comma-separated
   *        string. Will be called immediately with the current skip
   *        list value.
   */
  void registerAndRunSkipListObserver(in ACString aFeature,
                                      in ACString aPrefName,
                                      in nsIUrlClassifierSkipListObserver aObserver);

  /**
   * Unregister an observer.
   *
   * @param aFeature
   *        The feature for which to stop observing.
   *
   * @param aObserver
   *        The nsIUrlClassifierSkipListObserver object to unregister.
   */
  void unregisterSkipListObserver(in ACString aFeature,
                                  in nsIUrlClassifierSkipListObserver aObserver);

};