diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-04 13:17:38 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-04 13:17:38 +0200 |
commit | a1be17c1cea81ebb1e8b131a662c698d78f3f7f2 (patch) | |
tree | a92f7de513be600cc07bac458183e9af40e00c06 /application/basilisk/components/sessionstore/nsISessionStartup.idl | |
parent | bf11fdd304898ac675e39b01b280d39550e419d0 (diff) | |
download | UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.gz UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.lz UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.xz UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.zip |
Issue #303 Part 1: Move basilisk files from /browser to /application/basilisk
Diffstat (limited to 'application/basilisk/components/sessionstore/nsISessionStartup.idl')
-rw-r--r-- | application/basilisk/components/sessionstore/nsISessionStartup.idl | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/application/basilisk/components/sessionstore/nsISessionStartup.idl b/application/basilisk/components/sessionstore/nsISessionStartup.idl new file mode 100644 index 000000000..2321ac310 --- /dev/null +++ b/application/basilisk/components/sessionstore/nsISessionStartup.idl @@ -0,0 +1,66 @@ +/* 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, and window features + * - and allows to restore everything into one window. + */ + +[scriptable, uuid(934697e4-3807-47f8-b6c9-6caa8d83ccd1)] +interface nsISessionStartup: nsISupports +{ + /** + * Return a promise that is resolved once initialization + * is complete. + */ + readonly attribute jsval onceInitialized; + + // Get session state + readonly attribute jsval state; + + /** + * Determines whether there is a pending session restore. Should only be + * called after initialization has completed. + */ + boolean doRestore(); + + /** + * Determines whether automatic session restoration is enabled for this + * launch of the browser. This does not include crash restoration, and will + * return false if restoration will only be caused by a crash. + */ + boolean isAutomaticRestoreEnabled(); + + /** + * Returns whether we will restore a session that ends up replacing the + * homepage. The browser uses this to not start loading the homepage if + * we're going to stop its load anyway shortly after. + * + * This is meant to be an optimization for the average case that loading the + * session file finishes before we may want to start loading the default + * homepage. Should this be called before the session file has been read it + * will just return false. + */ + readonly attribute bool willOverrideHomepage; + + /** + * 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; + readonly attribute bool previousSessionCrashed; +}; |