Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 /**
8 * nsISessionStore keeps track of the current browsing state - i.e.
9 * tab history, cookies, scroll state, form data, and window features
10 * - and allows to restore everything into one window.
11 */
13 [scriptable, uuid(934697e4-3807-47f8-b6c9-6caa8d83ccd1)]
14 interface nsISessionStartup: nsISupports
15 {
16 /**
17 * Return a promise that is resolved once initialization
18 * is complete.
19 */
20 readonly attribute jsval onceInitialized;
22 // Get session state
23 readonly attribute jsval state;
25 /**
26 * Determines whether there is a pending session restore. Should only be
27 * called after initialization has completed.
28 */
29 boolean doRestore();
31 /**
32 * Determines whether automatic session restoration is enabled for this
33 * launch of the browser. This does not include crash restoration, and will
34 * return false if restoration will only be caused by a crash.
35 */
36 boolean isAutomaticRestoreEnabled();
38 /**
39 * Returns whether we will restore a session that ends up replacing the
40 * homepage. The browser uses this to not start loading the homepage if
41 * we're going to stop its load anyway shortly after.
42 *
43 * This is meant to be an optimization for the average case that loading the
44 * session file finishes before we may want to start loading the default
45 * homepage. Should this be called before the session file has been read it
46 * will just return false.
47 */
48 readonly attribute bool willOverrideHomepage;
50 /**
51 * What type of session we're restoring.
52 * NO_SESSION There is no data available from the previous session
53 * RECOVER_SESSION The last session crashed. It will either be restored or
54 * about:sessionrestore will be shown.
55 * RESUME_SESSION The previous session should be restored at startup
56 * DEFER_SESSION The previous session is fine, but it shouldn't be restored
57 * without explicit action (with the exception of pinned tabs)
58 */
59 const unsigned long NO_SESSION = 0;
60 const unsigned long RECOVER_SESSION = 1;
61 const unsigned long RESUME_SESSION = 2;
62 const unsigned long DEFER_SESSION = 3;
64 readonly attribute unsigned long sessionType;
65 readonly attribute bool previousSessionCrashed;
66 };