browser/components/sessionstore/nsISessionStartup.idl
author Gervase Markham <gerv@gerv.net>
Mon, 21 May 2012 12:12:37 +0100
changeset 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
parent 72871 a65a4165c2363af01a0c0da1a2eca362497bb094
child 95026 ad13022897bad8afb74247377d0b430fc5b0bf1a
permissions -rw-r--r--
Bug 716478 - update licence to MPL 2.

/* 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"

/**
 * nsISessionStore keeps track of the current browsing state - i.e.
 * tab history, cookies, scroll state, form data, POSTDATA and window features
 * - and allows to restore everything into one window.
 */

[scriptable, uuid(170c6857-7f71-46ce-bc9b-185723b1c3a8)]
interface nsISessionStartup: nsISupports
{
  // Get session state
  readonly attribute jsval state;

  /**
   * Determine if session should be restored 
   */
  boolean doRestore();

  /**
   * What type of session we're restoring.
   * NO_SESSION       There is no data available from the previous session
   * RECOVER_SESSION  The last session crashed. It will either be restored or
   *                  about:sessionrestore will be shown.
   * RESUME_SESSION   The previous session should be restored at startup
   * DEFER_SESSION    The previous session is fine, but it shouldn't be restored
   *                  without explicit action (with the exception of pinned tabs)
   */
  const unsigned long NO_SESSION = 0;
  const unsigned long RECOVER_SESSION = 1;
  const unsigned long RESUME_SESSION = 2;
  const unsigned long DEFER_SESSION = 3;

  readonly attribute unsigned long sessionType;
};