Bug 719434 - Add notifification/message for when SessionStore purges its state (r=mfinkle)

This commit is contained in:
Lucas Rocha 2012-02-14 17:50:55 +00:00
parent afcfb958bd
commit a79da8f74f
2 changed files with 6 additions and 0 deletions

View File

@ -224,6 +224,8 @@ var BrowserApp = {
Services.obs.addObserver(this, "SearchEngines:Get", false);
Services.obs.addObserver(this, "Passwords:Init", false);
Services.obs.addObserver(this, "sessionstore-state-purge-complete", false);
function showFullScreenWarning() {
NativeWindow.toast.show(Strings.browser.GetStringFromName("alertFullScreenToast"), "short");
}
@ -992,6 +994,8 @@ var BrowserApp = {
storage.init();
sendMessageToJava({gecko: { type: "Passwords:Init:Return" }});
} else if (aTopic == "sessionstore-state-purge-complete") {
sendMessageToJava({ gecko: { type: "Session:StatePurged" }});
}
},

View File

@ -275,6 +275,8 @@ SessionStore.prototype = {
// Save the purged state immediately
this.saveStateNow();
}
Services.obs.notifyObservers(null, "sessionstore-state-purge-complete", "");
break;
case "timer-callback":
// Timer call back for delayed saving