Judson Valeski wrote:

> Radha Kulkarni wrote:
> 
>> http://bugzilla.mozilla.org/show_bug.cgi?id=65608 
>> (nsISHistoryListener interface implementation)
> 
> nsISHistoryObserver -
> - no need for Count() and Enumerate() methods?

The interface though called nsISHistoryListener right now, looks more 
like a notification for nsIWebNavigation operations(Back, forward, 
reload, load)  Do we want to add nsISHistory related things like, Count, 
Index, enumerations, Max size also in it?  The enumeration issue came 
up  when we discussed this interface 2 weeks ago, but we didn't decide 
on anything. Each SH object stores URL, postdata, title, Layout info(for 
form values and scroll bar positions) . These are stored on nsISHEntry. 
Do we want to expose this object?   SHistory  maintains a hierarchy 
structure for subframes Do we want to give out the whole hierarchy for 
subframe navigations? These are things we need to decide.

> 
> -   /**
>    * Notify when History is about to be trimmed with an option to cancel
>    */
>    boolean OnHistoryPurge(in long aNumEntries);
> 
> How does one cancel this?
> 
If the return value is False, the purge operation is cancelled.

> Currently you only permit a single listener. Shouldn't mListener in 
> SHistory be an array (as it is in nsDocLoader.cpp for 
> webprogresslisteners)?
> 
Yes, currently I permit only one listener. We have a issue  with 
multiple listeners. What should we do if one listener wants to cancel 
the back operation and the other doesn't. If we do not provide  an 
option to cancel we can have multiple listeners. I think that's how 
webPrgressListener is. Also, I could not think of a situation where 
multiple content areas share one Session History.  There can be multiple 
listeners for global history, but I think probably not for SH.



Reply via email to