If I remember correctly, conceptually these steps need to happen first:
(1) Register your own nsIURIContentListener.
(2) SetParentURIContentListenr of a MozView to your listener.
(3) deny the load within the parentURIContentListener. so that Gecko
will look for other contentlistener to handle the load.
which will be yours registered separately.
(4) accept the load in your registered contentlistener.
Step (2,3) are a bit counter-intuitive.
If you trace into Gecko source code, when a mozview loads a content, it
asks its parent content handler for
permission to handle the load (this is where you have the opportunity to
deny the activation of the default
content handler.) Only after it fails does gecko start querying other
ContentHandler.
Steve
tulup wrote:
hello,
there is ContentListener class (implementation of
nsIURIContentListener) in the MozView.
tried to intercept URI loads, when navigating this sample app to some
test web page vie file:// ot http scheme.
now i can control to continue load data or abort it at the
ContentListener::OnStartURIOpen - it does called.
but none of the other nsIURIContentListener members didn't call never.
i'd like to see how doContent is working to implement something like
custom handler for data feeding to web browser.
so the question is, why doContent and other never called?
MozView registers content listener in CreateBroser function via
SetParentURIContentListener.
thanks,
A.
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding