Go to the source code of this file.
Macros | |
#define | BROKEN_WM_Z_ORDER |
Functions | |
Cu | import ("resource://gre/modules/XPCOMUtils.jsm") |
function | debug (aMsg) |
__defineGetter__ ("NetUtil", function(){delete this.NetUtil;Cu.import("resource://gre/modules/NetUtil.jsm");return NetUtil;}) | |
function | SessionStoreService () |
for (let i=0;i< aHistory.count;i++) = [] | |
if (hasContent) aTabData.storage | |
if (!aTabData.entries[tabIndex]) return | |
else | if (aTabData.pageStyle) delete aTabData.pageStyle |
this | _updateTextAndScrollDataForFrame (aWindow, aBrowser.contentWindow, aTabData.entries[tabIndex],!aTabData._formDataSaved, aFullData) |
if (aBrowser.currentURI.spec=="about:config") aTabData.entries[tabIndex].formdata | |
if (aFullData||this._checkPrivacyLevel(isHTTPS)||aContent.top.document.location.href=="about:sessionrestore") | |
domWindowUtils | getScrollXY (false, scrollX, scrollY) |
if (!node) return null | |
if (node instanceof Ci.nsIDOMHTMLInputElement) = node.value | |
else | if (!node.multiple) data[id] |
while ((node=formNodes.iterateNext())) | |
function | extractHosts (aEntry) |
this _windows[aWindow.__SSi] tabs | forEach (function(aTabData){aTabData.entries.forEach(extractHosts);}) |
if (!aHash[aHost][aPath]) aHash[aHost][aPath] | |
WINDOW_ATTRIBUTES | forEach (function(aAttr){winData[aAttr]=this._getWindowDimension(aWindow, aAttr);}, this) |
else | if (winData.hidden) delete winData.hidden |
if (this._loadState==STATE_RUNNING) = this._recentCrashes | |
for (ix in this._windows) | |
this | _updateCookies (total) |
if (nonPopupCount==0 &&lastClosedWindowsCopy.length > 0) | |
this | _saveWindowHistory (aWindow) |
this | _updateTextAndScrollData (aWindow) |
this | _updateCookieHosts (aWindow) |
this | _updateWindowFeatures (aWindow) |
if (!root.windows[0]) | |
catch (ex) | |
if (root._closedWindows) this._closedWindows | |
if (!aState.selectedWindow) | |
if (!winData.tabs) | |
else | if (root._firstTabs &&!aOverwriteTabs &&winData.tabs.length==1 &&(!winData.tabs[0].entries||winData.tabs[0].entries.length==0)) |
if (aOverwriteTabs &&tabbrowser.selectedTab._tPos >=newTabCount) tabbrowser.moveTabTo(tabbrowser.selectedTab | |
if (aOverwriteTabs &&newTabCount< openTabCount) | |
if (aOverwriteTabs||root._firstTabs) | |
this | restoreHistoryPrecursor (aWindow, tabs, winData.tabs,(aOverwriteTabs?(parseInt(winData.selected)||1):0), 0, 0) |
this | _sendRestoreCompletedNotifications () |
if (aTabs.length > 0) | |
if (!this._isWindowLoaded(aWindow)) | |
this | restoreHistory (aWindow, aTabs, aTabData, idMap) |
while (aTabs.length > 0 &&(!aTabData[0]._tabStillLoading||!aTabs[0].parentNode)) | |
if (aTabs.length==0) | |
if (history.count > 0) | |
history | QueryInterface (Ci.nsISHistoryInternal) |
if (!tabData.entries) | |
if (tabData.extData) | |
Array | filter (tab.attributes, function(aAttr){return(_this.xulAttributes.indexOf(aAttr.name) >-1);}).forEach(tab.removeAttribute |
for (let name in tabData.attributes) tab.setAttribute(name | |
if (tabData.storage &&browser.docShell instanceof Ci.nsIDocShell) this._deserializeSessionStorage(tabData.storage | |
event | initEvent ("SSTabRestoring", true, false) |
tab | dispatchEvent (event) |
if (activeIndex >=tabData.entries.length) activeIndex | |
if (tabData.entries.length > 0) | |
aWindow | setTimeout (function(){_this.restoreHistory(aWindow, aTabs, aTabData, aIdMap);}, 0) |
shEntry | setURI (ioService.newURI(aEntry.url, null, null)) |
shEntry | setTitle (aEntry.title||aEntry.url) |
if (aEntry.subframe) shEntry.setIsSubFrame(aEntry.subframe||false) = aEntry.contentType | |
if (aEntry.children &&shEntry instanceof Ci.nsISHContainer) | |
for (let url in aStorageData) | |
function | hasExpectedURL (aDocument, aURL)!aURL||aURL.replace(/var textArray |
function | restoreTextData (aContent, aPrefix, aURL) |
function | restoreFormData (aDocument, aData, aURL) |
function | restoreTextDataAndScrolling (aContent, aData, aPrefix) |
this | removeEventListener ("load", this.__SS_restore, true) |
if (aWinData.isPopup) | |
if (aWindow.gURLBar) | |
function | win_ (aName) |
if (aWidth &&aHeight &&(aWidth!=win_("width")||aHeight!=win_("height"))) | |
if (!isNaN(aLeft)&&!isNaN(aTop)&&(aLeft!=win_("screenX")||aTop!=win_("screenY"))) | |
if (this.windowToFocus &&this.windowToFocus.content) | |
for (var i=1;i<=aCookies.count;i++) | |
this | _saveStateObject (oState) |
createInstance (Ci.nsISupportsString) | |
this _observerService | notifyObservers (stateString,"sessionstore-state-write","") |
if (stateString.data) this._writeFile(this._sessionFile | |
if (this._sessionFileBackup.exists()) | |
getService (Ci.nsIWindowMediator) | |
while (windowsEnum.hasMoreElements()) | |
if (!win.closed) return win | |
while (ID in this._statesToRestore) | |
return this _prefBranch | getIntPref ("startup.page") |
if (aWindow.arguments &&aWindow.arguments[0]&&aWindow.arguments[0]==defaultArgs) aWindow.arguments[0] | |
switch (aAttribute) | |
return aWindow document documentElement | getAttribute (aAttribute)||dimension |
return ioService | newURI (aString, null, null) |
cr | annotateCrashReport ("URL", currentURI.spec) |
if (!winData||winData.length==0) return false | |
if (XRE.inSafeMode) return true | |
_safeEval new Cu | Sandbox ("about:blank")) |
if (/[\u2028\u2029]/.test(jsonString)) | |
if (this._closedWindows.length<=maxWindowsUndo) return | |
while (normalWindowIndex< this._closedWindows.length &&!!this._closedWindows[normalWindowIndex].isPopup) normalWindowIndex++ | |
if (normalWindowIndex >=maxWindowsUndo) spliceTo | |
this _closedWindows | splice (spliceTo) |
ostream | init (aFile, 0x02|0x08|0x20, 0600, 0) |
NetUtil | asyncCopy (istream, ostream, function(rc){if(Components.isSuccessCode(rc)){self._observerService.notifyObservers(null,"sessionstore-state-write-complete","");}}) |
Variables | |
const | Cc = Components.classes |
const | Ci = Components.interfaces |
const | Cr = Components.results |
const | Cu = Components.utils |
const | STATE_STOPPED = 0 |
const | STATE_RUNNING = 1 |
const | STATE_QUITTING = -1 |
const | STATE_STOPPED_STR = "stopped" |
const | STATE_RUNNING_STR = "running" |
const | PRIVACY_NONE = 0 |
const | PRIVACY_ENCRYPTED = 1 |
const | PRIVACY_FULL = 2 |
const | NOTIFY_WINDOWS_RESTORED = "sessionstore-windows-restored" |
const | NOTIFY_BROWSER_STATE_RESTORED = "sessionstore-browser-state-restored" |
const | OBSERVING |
const | WINDOW_ATTRIBUTES = ["width", "height", "screenX", "screenY", "sizemode"] |
const | WINDOW_HIDEABLE_FEATURES |
const | CAPABILITIES |
SessionStoreService | prototype |
SessionStoreService | _serializeSessionStorage |
SessionStoreService | aHistory |
SessionStoreService | aDocShell |
SessionStoreService | aFullData |
let | hasContent = false |
_updateTextAndScrollData | __pad0__ |
_updateTextAndScrollDataForTab | __pad1__ |
_updateTextAndScrollDataForTab | aBrowser |
_updateTextAndScrollDataForTab | aTabData |
let | selectedPageStyle |
aTabData | _formDataSaved = true |
_updateTextAndScrollDataForFrame | __pad2__ |
_updateTextAndScrollDataForFrame | aContent |
_updateTextAndScrollDataForFrame | aData |
_updateTextAndScrollDataForFrame | aUpdateFormData |
let | domWindowUtils |
let | scrollX = {} |
let | scrollY = {} |
aData | scroll = scrollX.value + "," + scrollY.value |
_getSelectedPageStyle | __pad3__ |
_getSelectedPageStyle s | i |
return { windows: total, selectedWindow: ix + 1, _closedWindows: lastClosedWindowsCopy } | |
_collectFormDataForFrame | __pad4__ |
_collectFormDataForFrame | aDocument |
_collectFormDataForFrame XPathHelper | resolveNS |
_collectFormDataForFrame XPathHelper Ci nsIDOMXPathResult | UNORDERED_NODE_ITERATOR_TYPE |
_collectFormDataForFrame XPathHelper Ci nsIDOMXPathResult | null |
let | node = formNodes.iterateNext() |
const | MAX_GENERATED_XPATHS = 100 |
let | generatedCount = 0 |
let | data = {} |
do | |
let | id = node.id ? "#" + node.id : XPathHelper.generate(node) |
else | |
_updateCookieHosts | __pad5__ |
var | _this = this |
_updateCookies | __pad6__ |
_updateCookies | aHost |
_updateCookies | aPath |
_updateCookies | aName |
_updateCookies | aCookie |
aHash [aHost][aPath][aName] = aCookie | |
var | cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2) |
var | jscookies = {} |
var | MAX_EXPIRY = Math.pow(2, 62) |
_updateWindowFeatures | __pad7__ |
var | hidden |
var | sidebar = aWindow.document.getElementById("sidebar-box").getAttribute("sidebarcommand") |
_getCurrentState | __pad8__ |
var | total = [] |
var | windows = [] |
var | nonPopupCount = 0 |
var | ix = this.activeWindowSSiCache ? windows.indexOf(this.activeWindowSSiCache) : -1 |
let | lastClosedWindowsCopy = this._closedWindows.slice() |
_getWindowState | __pad9__ |
_collectWindowData | __pad10__ |
this | _dirtyWindows [aWindow.__SSi] = false |
restoreWindow | __pad11__ |
restoreWindow | aState |
restoreWindow | aOverwriteTabs |
restoreWindow | aFollowUp |
try | |
var | winData = root.windows[0] |
var | tabbrowser = aWindow.gBrowser |
var | openTabCount = aOverwriteTabs ? tabbrowser.browsers.length : -1 |
var | newTabCount = winData.tabs.length |
var | tabs = [] |
var | tabstrip = tabbrowser.tabContainer.mTabstrip |
var | smoothScroll = tabstrip.smoothScroll |
restoreHistoryPrecursor | __pad12__ |
restoreHistoryPrecursor | aTabs |
restoreHistoryPrecursor | aSelectTab |
restoreHistoryPrecursor | aIx |
restoreHistoryPrecursor | aCount |
var | idMap = { used: {} } |
restoreHistory | __pad13__ |
restoreHistory | aIdMap |
var | tab = aTabs.shift() |
var | tabData = aTabData.shift() |
var | browser = aWindow.getBrowser().getBrowserForTab(tab) |
var | history = browser.webNavigation.sessionHistory |
else delete tab | __SS_extdata |
var | disallow = (tabData.disallow)?tabData.disallow.split(","):[] |
tabData | attributes [name] |
browser | docShell |
var | event = aWindow.document.createEvent("Events") |
let | activeIndex = (tabData.index || tabData.entries.length) - 1 |
_deserializeHistoryEntry | __pad14__ |
var | ioService |
shEntry | loadType = Ci.nsIDocShellLoadInfo.loadHistory |
var | postdata |
return | shEntry |
_deserializeSessionStorage | __pad15__ |
restoreDocument_proxy | __pad16__ |
let | window = this.ownerDocument.defaultView |
delete this | __SS_restore_data |
delete this | __SS_restore_text |
delete this | __SS_restore_pageStyle |
delete this | __SS_restore_tab |
delete this | __SS_restore |
restoreWindowFeatures | __pad17__ |
restoreWindowFeatures | aWinData |
restoreDimensions | __pad18__ |
restoreDimensions | aWidth |
restoreDimensions | aHeight |
restoreDimensions | aLeft |
restoreDimensions | aTop |
restoreDimensions | aSizeMode |
restoreDimensions | aSidebar |
restoreCookies | __pad19__ |
aCookies = converted | |
var | cookieManager |
saveStateDelayed | __pad20__ |
saveStateDelayed | aDelay |
saveStateDelayed | saveState |
var | oState = this._getCurrentState(aUpdateAll) |
oState | session |
_saveStateObject | __pad21__ |
this | _lastSaveTime = Date.now() |
_clearDisk | __pad22__ |
_forEachBrowserWindow | __pad23__ |
var | windowsEnum = windowMediator.getEnumerator("navigator:browser") |
_getMostRecentBrowserWindow | __pad24__ |
var | win = wm.getMostRecentWindow("navigator:browser") |
_openWindowWithState | __pad25__ |
this | _statesToRestore [(window.__SS_restoreID=ID)] = aState |
_doResumeSession | __pad26__ |
_isCmdLineEmpty | __pad27__ |
return!aWindow arguments!aWindow | arguments [0] |
_checkPrivacyLevel | __pad28__ |
_getWindowDimension | __pad29__ |
_getWindowDimension | aAttribute |
_getURIFromString | __pad30__ |
_updateCrashReportURL | __pad31__ |
var | cr = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsICrashReporter) |
_needsRestorePage | __pad32__ |
_needsRestorePage | aRecentCrashes |
let | XRE = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime) |
let | max_resumed_crashes |
let | sessionAge |
_safeEval | __pad33__ |
_toJSONString | __pad34__ |
return | jsonString |
_sendRestoreCompletedNotifications | __pad35__ |
_isWindowLoaded | __pad36__ |
_replaceLoadingTitle | __pad37__ |
_replaceLoadingTitle | aTabbrowser |
_replaceLoadingTitle | aTab |
_capClosedWindows | __pad38__ |
let | spliceTo = maxWindowsUndo |
let | normalWindowIndex = 0 |
_writeFile | __pad39__ |
var | converter |
converter | charset = "UTF-8" |
var | istream = converter.convertToInputStream(aData) |
var | self = this |
let | XPathHelper |
String prototype | hasRootDomain |
#define BROKEN_WM_Z_ORDER |
Definition at line 114 of file nsSessionStore.js.
__defineGetter__ | ( | "Application" | , |
function(){delete Application;Application=Cc["@mozilla.org/fuel/application;1"].getService(Ci.fuelIApplication);return Application;} | |||
) |
Construct a column spec parser and read the column specification immediately
aMediaList | The media list to find columns to display for |
aPlaylist | the playlist binding |
aMask | a bitfield containing the source to look for; see the ColumnSpecParser.ORIGIN_* constants |
[optional] | aConstraint the media type constraint to use, if any |
this _saveWindowHistory | ( | aWindow | ) |
this _sendRestoreCompletedNotifications | ( | ) |
this _updateCookieHosts | ( | aWindow | ) |
this _updateTextAndScrollData | ( | aWindow | ) |
this _updateTextAndScrollDataForFrame | ( | aWindow | , |
aBrowser. | contentWindow, | ||
aTabData. | entries[tabIndex], | ||
!aTabData. | _formDataSaved, | ||
aFullData | |||
) |
this _updateWindowFeatures | ( | aWindow | ) |
cr annotateCrashReport | ( | "URL" | , |
currentURI. | spec | ||
) |
NetUtil asyncCopy | ( | istream | , |
ostream | , | ||
function(rc){if(Components.isSuccessCode(rc)){self._observerService.notifyObservers(null,"sessionstore-state-write-complete","");}} | |||
) |
catch | ( | ex | ) |
createInstance | ( | Ci. | nsISupportsString | ) |
function debug | ( | aMsg | ) |
function extractHosts | ( | aEntry | ) |
Definition at line 1613 of file nsSessionStore.js.
Array filter | ( | tab. | attributes, |
function(aAttr){return(_this.xulAttributes.indexOf(aAttr.name) >-1);} | |||
) |
for | ( | ) | = [] |
for | ( | ix in this. | _windows | ) |
Definition at line 1744 of file nsSessionStore.js.
for | ( | let name in tabData. | attributes | ) |
for | ( | let url in | aStorageData | ) |
for | ( | var | i = 1; i <= aCookies.count; i++ | ) |
Definition at line 2493 of file nsSessionStore.js.
this _windows [aWindow.__SSi] tabs forEach | ( | function(aTabData){aTabData.entries.forEach(extractHosts);} | ) |
WINDOW_ATTRIBUTES forEach | ( | function(aAttr){winData[aAttr]=this._getWindowDimension(aWindow, aAttr);} | , |
this | |||
) |
return aWindow document documentElement getAttribute | ( | aAttribute | ) |
return this _prefBranch getIntPref | ( | "startup.page" | ) |
domWindowUtils getScrollXY | ( | false | , |
scrollX | , | ||
scrollY | |||
) |
getService | ( | Ci. | nsIWindowMediator | ) |
Definition at line 4 of file browser_sanitize-passwordDisabledHosts.js.
function hasExpectedURL | ( | aDocument | , |
aURL | |||
) |
if | ( | hasContent = 0 | ) |
Definition at line 1775 of file nsSessionStore.js.
if | ( | !aTabData. | entries[tabIndex] | ) |
else if | ( | aTabData. | pageStyle | ) |
if | ( | aBrowser.currentURI. | spec = ="about:config" | ) |
if | ( | aFullData||this._checkPrivacyLevel(isHTTPS)||aContent.top.document.location. | href = = "about:sessionrestore" | ) |
Definition at line 1508 of file nsSessionStore.js.
if | ( | ! | node | ) |
else if | ( | node instanceof Ci. | nsIDOMHTMLInputElement | ) | = node.value |
Definition at line 1585 of file nsSessionStore.js.
else if | ( | !node. | multiple | ) |
if | ( | ! | aHash[aHost][aPath] | ) |
if | ( | winData. | hidden | ) |
Definition at line 1912 of file nsSessionStore.js.
if | ( | this. | _loadState = = STATE_RUNNING | ) | = this._recentCrashes |
if | ( | nonPopupCount = = 0 && lastClosedWindowsCopy.length , |
|
0 | |||
) |
Definition at line 1766 of file nsSessionStore.js.
if | ( | !root. | windows[0] | ) |
if | ( | root. | _closedWindows | ) |
if | ( | !aState. | selectedWindow | ) |
Definition at line 1854 of file nsSessionStore.js.
if | ( | !winData. | tabs | ) |
Definition at line 1869 of file nsSessionStore.js.
else if | ( | root._firstTabs &&!aOverwriteTabs &&winData.tabs. | length = = 1 && (!winData.tabs[0].entries || winData.tabs[0].entries.length == 0) | ) |
Definition at line 1874 of file nsSessionStore.js.
if | ( | aOverwriteTabs &&tabbrowser.selectedTab._tPos >= | newTabCount | ) |
if | ( | ) |
Definition at line 1903 of file nsSessionStore.js.
if | ( | aOverwriteTabs||root. | _firstTabs | ) |
Definition at line 1923 of file nsSessionStore.js.
if | ( | aTabs. | length, |
0 | |||
) |
Definition at line 2004 of file nsSessionStore.js.
if | ( | !this. | _isWindowLoadedaWindow | ) |
Definition at line 2032 of file nsSessionStore.js.
if | ( | aTabs. | length = = 0 | ) |
Definition at line 2060 of file nsSessionStore.js.
if | ( | history. | count, |
0 | |||
) |
Definition at line 2070 of file nsSessionStore.js.
if | ( | !tabData. | entries | ) |
Definition at line 2075 of file nsSessionStore.js.
if | ( | tabData. | extData | ) |
Definition at line 2078 of file nsSessionStore.js.
if | ( | tabData.storage &&browser.docShell instanceof Ci. | nsIDocShell | ) |
if | ( | activeIndex >=tabData.entries. | length | ) |
if | ( | tabData.entries. | length, |
0 | |||
) |
Definition at line 2132 of file nsSessionStore.js.
else if | ( | aEntry. | subframe | ) | = aEntry.contentType |
if | ( | aEntry.children &&shEntry instanceof Ci. | nsISHContainer | ) |
Definition at line 2236 of file nsSessionStore.js.
if | ( | aWinData. | isPopup | ) |
Definition at line 2407 of file nsSessionStore.js.
if | ( | aWindow. | gURLBar = = aWindow.STATE_NORMAL | ) |
Definition at line 2416 of file nsSessionStore.js.
if | ( | aWidth &&aHeight &&aWidth!=win_("width")||aHeight!=win_("height") | ) |
Definition at line 2452 of file nsSessionStore.js.
if | ( | ! | isNaNaLeft)&&!isNaN(aTop)&&(aLeft!=win_("screenX")||aTop!=win_("screenY") | ) |
Definition at line 2455 of file nsSessionStore.js.
if | ( | this.windowToFocus &&this.windowToFocus. | content | ) |
Definition at line 2479 of file nsSessionStore.js.
if | ( | stateString. | data | ) |
if | ( | this._sessionFileBackup. | exists() | ) |
Definition at line 2604 of file nsSessionStore.js.
if | ( | !win. | closed | ) |
if | ( | aWindow.arguments &&aWindow.arguments &&aWindow. | arguments[0][0] = =defaultArgs | ) |
if | ( | !winData||winData. | length = =0 | ) |
if | ( | XRE. | inSafeMode | ) |
if | ( | //. | test(jsonString)[\u2028\u2029] | ) |
Definition at line 2869 of file nsSessionStore.js.
if | ( | this._closedWindows.length<= | maxWindowsUndo | ) |
if | ( | normalWindowIndex >= | maxWindowsUndo | ) |
Cu import | ( | "resource://gre/modules/XPCOMUtils.jsm" | ) |
ostream init | ( | aFile | , |
0x02|0x08| | 0x20, | ||
0600 | , | ||
0 | |||
) |
this _observerService notifyObservers | ( | stateString | , |
"sessionstore-state-write" | , | ||
"" | |||
) |
history QueryInterface | ( | Ci. | nsISHistoryInternal | ) |
function restoreFormData | ( | aDocument, | |
aData, | |||
aURL | |||
) |
Definition at line 2301 of file nsSessionStore.js.
this restoreHistoryPrecursor | ( | aWindow | , |
tabs | , | ||
winData. | tabs, | ||
(aOverwriteTabs?(parseInt(winData.selected)||1):0) | , | ||
0 | , | ||
0 | |||
) |
function restoreTextData | ( | aContent, | |
aPrefix, | |||
aURL | |||
) |
Definition at line 2284 of file nsSessionStore.js.
function restoreTextDataAndScrolling | ( | aContent, | |
aData, | |||
aPrefix | |||
) |
_safeEval new Cu Sandbox | ( | "about:blank" | ) |
function SessionStoreService | ( | ) |
Definition at line 133 of file nsSessionStore.js.
aWindow setTimeout | ( | function(){_this.restoreHistory(aWindow, aTabs, aTabData, aIdMap);} | , |
0 | |||
) |
shEntry setTitle | ( | aEntry.title||aEntry. | url | ) |
shEntry setURI | ( | ioService. | newURIaEntry.url, null, null | ) |
switch | ( | aAttribute | ) |
Definition at line 2757 of file nsSessionStore.js.
while | ( | (node=formNodes.iterateNext()) | ) |
while | ( | aTabs. | length, |
0 && | !aTabData[0]._tabStillLoading||!aTabs[0].parentNode | ||
) |
Definition at line 2056 of file nsSessionStore.js.
while | ( | windowsEnum. | hasMoreElements() | ) |
Definition at line 2625 of file nsSessionStore.js.
while | ( | ID in this. | _statesToRestore | ) |
while | ( | ) |
function win_ | ( | aName | ) |
Definition at line 2449 of file nsSessionStore.js.
_updateTextAndScrollData __pad0__ |
go through all tabs and store the current scroll positions and innerHTML content of WYSIWYG editors
aWindow | Window reference |
Definition at line 1426 of file nsSessionStore.js.
_collectWindowData __pad10__ |
Definition at line 1801 of file nsSessionStore.js.
restoreWindow __pad11__ |
restore features to a single window
aWindow | Window reference |
aState | JS object or its eval'able source |
aOverwriteTabs | bool overwrite existing tabs w/ new ones |
aFollowUp | bool this isn't the restoration of the first window |
Definition at line 1814 of file nsSessionStore.js.
restoreHistoryPrecursor __pad12__ |
Manage history restoration for a window
aWindow | Window to restore the tabs into |
aTabs | Array of tab references |
aTabData | Array of tab data |
aSelectTab | Index of selected tab |
aIx | Index of the next tab to check readyness for |
aCount | Counter for number of times delaying b/c browser or history aren't ready |
Definition at line 1934 of file nsSessionStore.js.
restoreHistory __pad13__ |
Restory history for a window
aWindow | Window reference |
aTabs | Array of tab references |
aTabData | Array of tab data |
aIdMap | Hash for ensuring unique frame IDs |
Definition at line 2041 of file nsSessionStore.js.
_deserializeHistoryEntry __pad14__ |
expands serialized history data into a session-history-entry instance
aEntry | Object containing serialized history data for a URL |
aIdMap | Hash for ensuring unique frame IDs |
Definition at line 2153 of file nsSessionStore.js.
_deserializeSessionStorage __pad15__ |
restores all sessionStorage "super cookies"
aStorageData | Storage data to be restored |
aDocShell | A tab's docshell (containing the sessionStorage) |
Definition at line 2246 of file nsSessionStore.js.
restoreDocument_proxy __pad16__ |
Restore properties to a loaded document
Definition at line 2267 of file nsSessionStore.js.
restoreWindowFeatures __pad17__ |
Restore visibility and dimension features to a window
aWindow | Window reference |
aWinData | Object containing session data for the window |
Definition at line 2392 of file nsSessionStore.js.
restoreDimensions __pad18__ |
Restore a window's dimensions
aWidth | Window width |
aHeight | Window height |
aLeft | Window left |
aTop | Window top |
aSizeMode | Window size mode (eg: maximized) |
aSidebar | Sidebar command |
Definition at line 2429 of file nsSessionStore.js.
restoreCookies __pad19__ |
Restores cookies (accepting both Firefox 2.0 and current format)
aCookies | Array of cookie objects |
Definition at line 2482 of file nsSessionStore.js.
_updateTextAndScrollDataForTab __pad1__ |
go through all frames and store the current scroll positions and innerHTML content of WYSIWYG editors
aWindow | Window reference |
aBrowser | single browser reference |
aTabData | tabData object to add the information to |
aFullData | always return privacy sensitive data (use with care) |
Definition at line 1446 of file nsSessionStore.js.
saveStateDelayed __pad20__ |
save state delayed by N ms marks window as dirty (i.e. data update can't be skipped)
aWindow | Window reference |
aDelay | Milliseconds to delay |
Definition at line 2516 of file nsSessionStore.js.
_saveStateObject __pad21__ |
write a state object to disk
Definition at line 2573 of file nsSessionStore.js.
_clearDisk __pad22__ |
delete session datafile and backup
Definition at line 2592 of file nsSessionStore.js.
_forEachBrowserWindow __pad23__ |
call a callback for all currently opened browser windows (might miss the most recent one)
aFunc | Callback each window is passed to |
Definition at line 2610 of file nsSessionStore.js.
_getMostRecentBrowserWindow __pad24__ |
Returns most recent window
Definition at line 2631 of file nsSessionStore.js.
_openWindowWithState __pad25__ |
open a new browser window for a given session state called when restoring a multi-window session
aState | Object containing session data |
Definition at line 2666 of file nsSessionStore.js.
_doResumeSession __pad26__ |
Whether or not to resume session, if not recovering from a crash.
Definition at line 2691 of file nsSessionStore.js.
_isCmdLineEmpty __pad27__ |
whether the user wants to load any other page at startup (except the homepage) - needed for determining whether to overwrite the current tabs C.f.: nsBrowserContentHandler's defaultArgs implementation.
Definition at line 2703 of file nsSessionStore.js.
_checkPrivacyLevel __pad28__ |
don't save sensitive data if the user doesn't want to (distinguishes between encrypted and non-encrypted sites)
aIsHTTPS | Bool is encrypted |
Definition at line 2719 of file nsSessionStore.js.
_getWindowDimension __pad29__ |
on popup windows, the XULWindow's attributes seem not to be set correctly we use thus JSDOMWindow attributes for sizemode and normal window attributes (and hope for reasonable values when maximized/minimized - since then outerWidth/outerHeight aren't the dimensions of the restored window)
aWindow | Window reference |
aAttribute | String sizemode | width | height | other window attribute |
Definition at line 2730 of file nsSessionStore.js.
_updateTextAndScrollDataForFrame __pad2__ |
go through all subframes and store all form data, the current scroll positions and innerHTML content of WYSIWYG editors
aWindow | Window reference |
aContent | frame reference |
aData | part of a tabData object to add the information to |
aUpdateFormData | update all form data for this tab |
aFullData | always return privacy sensitive data (use with care) |
Definition at line 1482 of file nsSessionStore.js.
_getURIFromString __pad30__ |
Get nsIURI from string
string |
Definition at line 2773 of file nsSessionStore.js.
_updateCrashReportURL __pad31__ |
Annotate a breakpad crash report with the currently selected tab's URL.
Definition at line 2784 of file nsSessionStore.js.
_needsRestorePage __pad32__ |
aState | is a session state |
aRecentCrashes | is the number of consecutive crashes |
Definition at line 2811 of file nsSessionStore.js.
_safeEval __pad33__ |
safe eval'ing
Definition at line 2846 of file nsSessionStore.js.
_toJSONString __pad34__ |
Converts a JavaScript object into a JSON string (see http://www.json.org/ for more information).
The inverse operation consists of JSON.parse(JSON_string).
aJSObject | is the object to be converted |
Definition at line 2853 of file nsSessionStore.js.
_sendRestoreCompletedNotifications __pad35__ |
Definition at line 2877 of file nsSessionStore.js.
_isWindowLoaded __pad36__ |
aWindow | Window reference |
Definition at line 2891 of file nsSessionStore.js.
_replaceLoadingTitle __pad37__ |
Replace "Loading..." with the tab label (with minimal side-effects)
aString | is the string the title is stored in |
aTabbrowser | is a tabbrowser object, containing aTab |
aTab | is the tab whose title we're updating & using |
Definition at line 2901 of file nsSessionStore.js.
_capClosedWindows __pad38__ |
Resize this._closedWindows to the value of the pref, except in the case where we don't have any non-popup windows on Windows and Linux. Then we must resize such that we have at least one non-popup window.
Definition at line 2917 of file nsSessionStore.js.
_writeFile __pad39__ |
write file to disk
aFile | nsIFile |
aData | String data |
Definition at line 2939 of file nsSessionStore.js.
_getSelectedPageStyle __pad3__ |
determine the title of the currently enabled style sheet (if any) and recurse through the frameset if necessary
aContent | is a frame reference |
Definition at line 1538 of file nsSessionStore.js.
_collectFormDataForFrame __pad4__ |
collect the state of all form elements
aDocument | document reference |
Definition at line 1560 of file nsSessionStore.js.
_updateCookieHosts __pad5__ |
store all hosts for a URL
aWindow | Window reference |
Definition at line 1602 of file nsSessionStore.js.
_updateCookies __pad6__ |
Serialize cookie data
aWindows | array of Window references |
Definition at line 1629 of file nsSessionStore.js.
_updateWindowFeatures __pad7__ |
Store window dimensions, visibility, sidebar
aWindow | Window reference |
Definition at line 1687 of file nsSessionStore.js.
_getCurrentState __pad8__ |
serialize session data as Ini-formatted string
aUpdateAll | Bool update all windows |
Definition at line 1714 of file nsSessionStore.js.
_getWindowState __pad9__ |
serialize session data for a window
aWindow | Window reference |
Definition at line 1781 of file nsSessionStore.js.
Definition at line 2084 of file nsSessionStore.js.
delete this __SS_restore |
Definition at line 2391 of file nsSessionStore.js.
delete this __SS_restore_data |
Definition at line 2387 of file nsSessionStore.js.
delete this __SS_restore_pageStyle |
Definition at line 2389 of file nsSessionStore.js.
delete this __SS_restore_tab |
Definition at line 2390 of file nsSessionStore.js.
delete this __SS_restore_text |
Definition at line 2388 of file nsSessionStore.js.
Definition at line 1813 of file nsSessionStore.js.
Definition at line 1477 of file nsSessionStore.js.
Definition at line 2591 of file nsSessionStore.js.
SessionStoreService _serializeSessionStorage |
Updates all sessionStorage "super cookies"
aTabData | The data object for a specific tab |
aHistory | That tab's session history |
aDocShell | That tab's docshell (containing the sessionStorage) |
aFullData | always return privacy sensitive data (use with care) |
Definition at line 136 of file nsSessionStore.js.
Definition at line 2688 of file nsSessionStore.js.
var _this = this |
Definition at line 1627 of file nsSessionStore.js.
_getWindowDimension aAttribute |
Definition at line 2743 of file nsSessionStore.js.
_updateTextAndScrollDataForTab aBrowser |
Definition at line 1446 of file nsSessionStore.js.
_updateTextAndScrollDataForFrame aContent |
Definition at line 1482 of file nsSessionStore.js.
_updateCookies aCookie |
Definition at line 1637 of file nsSessionStore.js.
aCookies = converted |
Definition at line 2502 of file nsSessionStore.js.
restoreHistoryPrecursor aCount |
Definition at line 1952 of file nsSessionStore.js.
let activeIndex = (tabData.index || tabData.entries.length) - 1 |
Definition at line 2120 of file nsSessionStore.js.
_writeFile aData |
Definition at line 1482 of file nsSessionStore.js.
saveStateDelayed aDelay |
Definition at line 2528 of file nsSessionStore.js.
_deserializeSessionStorage aDocShell |
Definition at line 136 of file nsSessionStore.js.
_collectFormDataForFrame aDocument |
Definition at line 1560 of file nsSessionStore.js.
restoreWindow aFollowUp |
Definition at line 1829 of file nsSessionStore.js.
_updateTextAndScrollDataForFrame aFullData |
Definition at line 1377 of file nsSessionStore.js.
restoreDimensions aHeight |
Definition at line 2429 of file nsSessionStore.js.
SessionStoreService aHistory |
Definition at line 136 of file nsSessionStore.js.
_updateCookies aHost |
Definition at line 1629 of file nsSessionStore.js.
_deserializeHistoryEntry aIdMap |
Definition at line 2054 of file nsSessionStore.js.
Definition at line 1934 of file nsSessionStore.js.
restoreDimensions aLeft |
Definition at line 2429 of file nsSessionStore.js.
_updateCookies aName |
Definition at line 1629 of file nsSessionStore.js.
restoreWindow aOverwriteTabs |
Definition at line 1814 of file nsSessionStore.js.
_updateCookies aPath |
Definition at line 1629 of file nsSessionStore.js.
_needsRestorePage aRecentCrashes |
Definition at line 2818 of file nsSessionStore.js.
return !aWindow arguments !aWindow arguments[0] |
Definition at line 2718 of file nsSessionStore.js.
restoreHistoryPrecursor aSelectTab |
Definition at line 1934 of file nsSessionStore.js.
restoreDimensions aSidebar |
Definition at line 2446 of file nsSessionStore.js.
restoreDimensions aSizeMode |
Definition at line 2429 of file nsSessionStore.js.
restoreWindow aState |
Definition at line 1814 of file nsSessionStore.js.
_replaceLoadingTitle aTab |
Definition at line 2911 of file nsSessionStore.js.
_replaceLoadingTitle aTabbrowser |
Definition at line 2901 of file nsSessionStore.js.
restoreHistory aTabData |
Definition at line 1446 of file nsSessionStore.js.
restoreHistory aTabs |
Definition at line 1934 of file nsSessionStore.js.
restoreDimensions aTop |
Definition at line 2429 of file nsSessionStore.js.
Definition at line 2110 of file nsSessionStore.js.
_updateTextAndScrollDataForFrame aUpdateFormData |
Definition at line 1482 of file nsSessionStore.js.
restoreDimensions aWidth |
Definition at line 2429 of file nsSessionStore.js.
restoreWindowFeatures aWinData |
Definition at line 2401 of file nsSessionStore.js.
var browser = aWindow.getBrowser().getBrowserForTab(tab) |
Definition at line 2067 of file nsSessionStore.js.
const CAPABILITIES |
Definition at line 108 of file nsSessionStore.js.
const Cc = Components.classes |
Session Storage and Restoration
Overview This service keeps track of a user's session, storing the various bits required to return the browser to its current state. The relevant data is stored in memory, and is periodically saved to disk in a file in the profile directory. The service is started at first window load, in delayedStartup, and will restore the session from the data received from the nsSessionStartup service.
Definition at line 56 of file nsSessionStore.js.
converter charset = "UTF-8" |
Definition at line 2959 of file nsSessionStore.js.
const Ci = Components.interfaces |
Definition at line 57 of file nsSessionStore.js.
var cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2) |
Definition at line 1647 of file nsSessionStore.js.
var converter |
Definition at line 2957 of file nsSessionStore.js.
var cookieManager |
Definition at line 2505 of file nsSessionStore.js.
const Cr = Components.results |
Definition at line 58 of file nsSessionStore.js.
var cr = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsICrashReporter) |
Definition at line 2803 of file nsSessionStore.js.
const Cu = Components.utils |
Definition at line 59 of file nsSessionStore.js.
argString data = {} |
Definition at line 1578 of file nsSessionStore.js.
var disallow = (tabData.disallow)?tabData.disallow.split(","):[] |
Definition at line 2094 of file nsSessionStore.js.
do |
Definition at line 1579 of file nsSessionStore.js.
browser docShell |
Definition at line 2113 of file nsSessionStore.js.
let domWindowUtils |
Definition at line 1533 of file nsSessionStore.js.
else |
Definition at line 1595 of file nsSessionStore.js.
function event = aWindow.document.createEvent("Events") |
Definition at line 2116 of file nsSessionStore.js.
let generatedCount = 0 |
Definition at line 1576 of file nsSessionStore.js.
let hasContent = false |
Definition at line 1379 of file nsSessionStore.js.
Definition at line 3063 of file nsSessionStore.js.
var hidden |
Definition at line 1701 of file nsSessionStore.js.
var history = browser.webNavigation.sessionHistory |
Definition at line 2068 of file nsSessionStore.js.
_getSelectedPageStyle s i |
Definition at line 1538 of file nsSessionStore.js.
let id = node.id ? "#" + node.id : XPathHelper.generate(node) |
Definition at line 1584 of file nsSessionStore.js.
var idMap = { used: {} } |
Definition at line 2039 of file nsSessionStore.js.
var ioService |
Definition at line 2167 of file nsSessionStore.js.
var istream = converter.convertToInputStream(aData) |
Definition at line 2962 of file nsSessionStore.js.
ix = this.activeWindowSSiCache ? windows.indexOf(this.activeWindowSSiCache) : -1 |
Definition at line 1743 of file nsSessionStore.js.
var jscookies = {} |
Definition at line 1652 of file nsSessionStore.js.
return jsonString |
Definition at line 2876 of file nsSessionStore.js.
let lastClosedWindowsCopy = this._closedWindows.slice() |
Definition at line 1762 of file nsSessionStore.js.
shEntry loadType = Ci.nsIDocShellLoadInfo.loadHistory |
Definition at line 2173 of file nsSessionStore.js.
var MAX_EXPIRY = Math.pow(2, 62) |
Definition at line 1655 of file nsSessionStore.js.
const MAX_GENERATED_XPATHS = 100 |
Definition at line 1575 of file nsSessionStore.js.
return max_resumed_crashes |
Definition at line 2838 of file nsSessionStore.js.
newTabCount = winData.tabs.length |
Definition at line 1881 of file nsSessionStore.js.
let node = formNodes.iterateNext() |
Definition at line 1571 of file nsSessionStore.js.
var nonPopupCount = 0 |
Definition at line 1742 of file nsSessionStore.js.
let normalWindowIndex = 0 |
Definition at line 2930 of file nsSessionStore.js.
const NOTIFY_BROWSER_STATE_RESTORED = "sessionstore-browser-state-restored" |
Definition at line 73 of file nsSessionStore.js.
const NOTIFY_WINDOWS_RESTORED = "sessionstore-windows-restored" |
Definition at line 72 of file nsSessionStore.js.
_collectFormDataForFrame XPathHelper Ci nsIDOMXPathResult null |
Definition at line 1560 of file nsSessionStore.js.
const OBSERVING |
Definition at line 76 of file nsSessionStore.js.
var openTabCount = aOverwriteTabs ? tabbrowser.browsers.length : -1 |
Definition at line 1880 of file nsSessionStore.js.
var oState = this._getCurrentState(aUpdateAll) |
Definition at line 2564 of file nsSessionStore.js.
var postdata |
Definition at line 2204 of file nsSessionStore.js.
const PRIVACY_ENCRYPTED = 1 |
Definition at line 69 of file nsSessionStore.js.
const PRIVACY_FULL = 2 |
Definition at line 70 of file nsSessionStore.js.
const PRIVACY_NONE = 0 |
Definition at line 68 of file nsSessionStore.js.
SessionStoreService prototype |
Definition at line 136 of file nsSessionStore.js.
_collectFormDataForFrame XPathHelper resolveNS |
Definition at line 1560 of file nsSessionStore.js.
return { windows: total, selectedWindow: ix + 1, _closedWindows: lastClosedWindowsCopy } |
Definition at line 1559 of file nsSessionStore.js.
saveStateDelayed saveState |
save state to disk
aUpdateAll | Bool update all windows |
Definition at line 2528 of file nsSessionStore.js.
aData scroll = scrollX.value + "," + scrollY.value |
Definition at line 1537 of file nsSessionStore.js.
let scrollX = {} |
Definition at line 1535 of file nsSessionStore.js.
let scrollY = {} |
Definition at line 1535 of file nsSessionStore.js.
let selectedPageStyle |
Definition at line 1467 of file nsSessionStore.js.
var self = this |
Definition at line 2963 of file nsSessionStore.js.
oState session |
Definition at line 2565 of file nsSessionStore.js.
let sessionAge |
Definition at line 2840 of file nsSessionStore.js.
return shEntry |
Definition at line 2245 of file nsSessionStore.js.
var sidebar = aWindow.document.getElementById("sidebar-box").getAttribute("sidebarcommand") |
Definition at line 1709 of file nsSessionStore.js.
tabstrip smoothScroll = tabstrip.smoothScroll |
Definition at line 1886 of file nsSessionStore.js.
let spliceTo = maxWindowsUndo |
Definition at line 2928 of file nsSessionStore.js.
const STATE_QUITTING = -1 |
Definition at line 63 of file nsSessionStore.js.
const STATE_RUNNING = 1 |
Definition at line 62 of file nsSessionStore.js.
const STATE_RUNNING_STR = "running" |
Definition at line 66 of file nsSessionStore.js.
const STATE_STOPPED = 0 |
Definition at line 61 of file nsSessionStore.js.
const STATE_STOPPED_STR = "stopped" |
Definition at line 65 of file nsSessionStore.js.
Array tab = aTabs.shift() |
Definition at line 2064 of file nsSessionStore.js.
var tabbrowser = aWindow.gBrowser |
Definition at line 1879 of file nsSessionStore.js.
var tabData = aTabData.shift() |
Definition at line 2065 of file nsSessionStore.js.
var tabs = [] |
Definition at line 1882 of file nsSessionStore.js.
var tabstrip = tabbrowser.tabContainer.mTabstrip |
Definition at line 1885 of file nsSessionStore.js.
var total = [] |
Definition at line 1741 of file nsSessionStore.js.
try |
Definition at line 1837 of file nsSessionStore.js.
_collectFormDataForFrame XPathHelper Ci nsIDOMXPathResult UNORDERED_NODE_ITERATOR_TYPE |
Definition at line 1560 of file nsSessionStore.js.
return win = wm.getMostRecentWindow("navigator:browser") |
Definition at line 2641 of file nsSessionStore.js.
let winData = root.windows[0] |
Definition at line 1853 of file nsSessionStore.js.
return window = this.ownerDocument.defaultView |
Definition at line 2340 of file nsSessionStore.js.
const WINDOW_ATTRIBUTES = ["width", "height", "screenX", "screenY", "sizemode"] |
Definition at line 89 of file nsSessionStore.js.
const WINDOW_HIDEABLE_FEATURES |
Definition at line 95 of file nsSessionStore.js.
var windows = [] |
Definition at line 1741 of file nsSessionStore.js.
var windowsEnum = windowMediator.getEnumerator("navigator:browser") |
Definition at line 2623 of file nsSessionStore.js.
let XPathHelper |
Definition at line 2974 of file nsSessionStore.js.
let XRE = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime) |
Definition at line 2834 of file nsSessionStore.js.