summaryrefslogtreecommitdiffstats
path: root/comm/suite/components/sessionstore/nsISessionStartup.idl
diff options
context:
space:
mode:
Diffstat (limited to 'comm/suite/components/sessionstore/nsISessionStartup.idl')
-rw-r--r--comm/suite/components/sessionstore/nsISessionStartup.idl39
1 files changed, 39 insertions, 0 deletions
diff --git a/comm/suite/components/sessionstore/nsISessionStartup.idl b/comm/suite/components/sessionstore/nsISessionStartup.idl
new file mode 100644
index 0000000000..018b0c1d4c
--- /dev/null
+++ b/comm/suite/components/sessionstore/nsISessionStartup.idl
@@ -0,0 +1,39 @@
+/* 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(dd709821-820a-4d0d-b7e8-a566b32377ef)]
+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;
+};