Last Comment Bug 633722 - Port Bug 615394 [Session Restore should notify when it is beginning and ending a restore]
: Port Bug 615394 [Session Restore should notify when it is beginning and endin...
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Session Restore (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey2.1b3
Assigned To: Misak Khachatryan
:
Mentors:
Depends on: 615394
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-12 04:05 PST by Misak Khachatryan
Modified: 2011-02-16 04:55 PST (History)
1 user (show)
bugzillamozillaorg_serge_20140323: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (24.12 KB, patch)
2011-02-12 04:05 PST, Misak Khachatryan
neil: review+
Details | Diff | Review

Description Misak Khachatryan 2011-02-12 04:05:14 PST
Created attachment 511946 [details] [diff] [review]
patch

From parent bug:

This should cover setWindowState, as well as other restore triggers. This is
necessary for Panorama to properly handle session restore. We need this sooner
than later, as it blocks a number of Panorama bugs.

So we really want to make it clear when we're adding/replacing state.

This can be done via restoreLastSession, setBrowserState, setWindowState,
setTabState, duplicateTab, undoCloseTab, undoCloseWindow.

Of those, restoreLastSession & setBrowserState will send
sessionstore-browser-state-restored when finished.

setWindowState will fire SSTabRestoring on each tab it's restoring.
setTabState, undoCloseTab, duplicateTab should also be firing a single
SSTabRestoring.

undoCloseWindow will open a new window so doesn't actually matter to Panorama
right now.

So what I'm thinking right now is that we fire an event on the window when we
start modifying state then fire another event indicating that we're ready for
that state to be inspected/modified. Something like SSWindowStateBusy and
SSWindowStateReady?

That might be a bit too much of a wide angle approach, but I think it achieves
what we want and is enough for Panorama to know not to just start doing things
on TabOpen.
Comment 1 neil@parkwaycc.co.uk 2011-02-15 08:51:30 PST
Comment on attachment 511946 [details] [diff] [review]
patch

>+  _sendWindowStateEvent: function sss__sendWindowStateEvent(aWindow, aType) {
At some point I'm going to regret asking for single underscores.
But not just yet ;-)
Comment 2 Misak Khachatryan 2011-02-15 22:32:25 PST
Pushed with nit fixed: http://hg.mozilla.org/comm-central/rev/c18dddea67de

Note You need to log in before you can comment on or make changes to this bug.