docshell/shistory/public/nsISHistoryInternal.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/shistory/public/nsISHistoryInternal.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,104 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 + 
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIBFCacheEntry;
    1.12 +interface nsISHEntry;
    1.13 +interface nsISHistoryListener;
    1.14 +interface nsISHTransaction;
    1.15 +interface nsIDocShell;
    1.16 +interface nsIURI;
    1.17 +
    1.18 +%{C++
    1.19 +#define NS_SHISTORY_INTERNAL_CID \
    1.20 +{ 0x9c47c121, 0x1c6e, 0x4d8f, \
    1.21 +  { 0xb9, 0x04, 0x3a, 0xc9, 0x68, 0x11, 0x6e, 0x88 } }
    1.22 +
    1.23 +#define NS_SHISTORY_INTERNAL_CONTRACTID "@mozilla.org/browser/shistory-internal;1"
    1.24 +
    1.25 +#include "nsTArrayForwardDeclare.h"
    1.26 +%}
    1.27 +
    1.28 +[ref] native nsDocshellIDArray(nsTArray<uint64_t>);
    1.29 +
    1.30 +[scriptable, uuid(f9348014-0239-11e2-b029-3d38e719eb2d)]
    1.31 +interface nsISHistoryInternal: nsISupports
    1.32 +{
    1.33 +  /**
    1.34 +   * Add a new Entry to the History List
    1.35 +   * @param aEntry - The entry to add
    1.36 +   * @param aPersist - If true this specifies that the entry should persist
    1.37 +   * in the list.  If false, this means that when new entries are added
    1.38 +   * this element will not appear in the session history list.
    1.39 +   */
    1.40 +   void  addEntry(in nsISHEntry aEntry, in boolean aPersist);
    1.41 +
    1.42 +  /**
    1.43 +   * Get the root transaction
    1.44 +   */
    1.45 +   readonly attribute nsISHTransaction rootTransaction;
    1.46 +
    1.47 +  /**
    1.48 +   * The toplevel docshell object to which this SHistory object belongs to.
    1.49 +   */
    1.50 +   attribute nsIDocShell rootDocShell;
    1.51 +
    1.52 +  /** 
    1.53 +   * Update the index maintained by sessionHistory
    1.54 +   */
    1.55 +   void updateIndex();
    1.56 +
    1.57 +  /**
    1.58 +   * Replace the nsISHEntry at a particular index
    1.59 +   * @param aIndex - The index at which the entry should be replaced
    1.60 +   * @param aReplaceEntry - The replacement entry for the index.
    1.61 +   */
    1.62 +   void replaceEntry(in long aIndex, in nsISHEntry aReplaceEntry);
    1.63 +
    1.64 +  /**
    1.65 +   * Notifies all registered session history listeners about an impending
    1.66 +   * reload.
    1.67 +   *
    1.68 +   * @param aReloadURI    The URI of the document to be reloaded.
    1.69 +   * @param aReloadFlags  Flags that indicate how the document is to be
    1.70 +   *                      refreshed. See constants on the nsIWebNavigation
    1.71 +   *                      interface.
    1.72 +   * @return              Whether the operation can proceed.
    1.73 +   */
    1.74 +   boolean notifyOnHistoryReload(in nsIURI aReloadURI, in unsigned long aReloadFlags);
    1.75 +
    1.76 +   /**
    1.77 +    * Evict content viewers which don't lie in the "safe" range around aIndex.
    1.78 +    * In practice, this should leave us with no more than gHistoryMaxViewers
    1.79 +    * viewers associated with this SHistory object.
    1.80 +    *
    1.81 +    * Also make sure that the total number of content viewers in all windows is
    1.82 +    * not greater than our global max; if it is, evict viewers as appropriate.
    1.83 +    *
    1.84 +    * @param aIndex - The index around which the "safe" range is centered.  In
    1.85 +    *   general, if you just navigated the history, aIndex should be the index
    1.86 +    *   history was navigated to.
    1.87 +    */
    1.88 +   void evictOutOfRangeContentViewers(in long aIndex);
    1.89 +   
    1.90 +   /**
    1.91 +    * Evict the content viewer associated with a bfcache entry
    1.92 +    * that has timed out.
    1.93 +    */
    1.94 +   void evictExpiredContentViewerForEntry(in nsIBFCacheEntry aEntry);
    1.95 +
    1.96 +   /**
    1.97 +    * Evict all the content viewers in this session history
    1.98 +    */
    1.99 +   void evictAllContentViewers();
   1.100 +
   1.101 +   /**
   1.102 +    * Removes entries from the history if their docshellID is in
   1.103 +    * aIDs array.
   1.104 +    */
   1.105 +  [noscript, notxpcom] void RemoveEntries(in nsDocshellIDArray aIDs,
   1.106 +                                          in long aStartIndex);
   1.107 +};

mercurial