2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#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.
|
|
|
|
*/
|
|
|
|
|
2011-07-15 09:42:21 -07:00
|
|
|
[scriptable, uuid(170c6857-7f71-46ce-bc9b-185723b1c3a8)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsISessionStartup: nsISupports
|
|
|
|
{
|
2011-07-15 09:42:21 -07:00
|
|
|
// Get session state
|
|
|
|
readonly attribute jsval state;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2012-05-25 14:39:22 -07:00
|
|
|
* Determine if session should be restored
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
boolean doRestore();
|
2008-02-14 13:53:33 -08:00
|
|
|
|
|
|
|
/**
|
2010-09-10 10:57:28 -07:00
|
|
|
* 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)
|
2008-02-14 13:53:33 -08:00
|
|
|
*/
|
|
|
|
const unsigned long NO_SESSION = 0;
|
|
|
|
const unsigned long RECOVER_SESSION = 1;
|
|
|
|
const unsigned long RESUME_SESSION = 2;
|
2010-09-10 10:57:28 -07:00
|
|
|
const unsigned long DEFER_SESSION = 3;
|
2008-02-14 13:53:33 -08:00
|
|
|
|
|
|
|
readonly attribute unsigned long sessionType;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|