> In an embeded mozilla browser,
> is there a way I can replace the default action which takes place
> when no registered content handlers are available ?
At the moment, the unknown content type handler is a component, which
you could replace with your own implementation. I'll propose something
better in a moment, but conceptually you could just copy the whole
component and change the three points where it brings up a dialog to do
what you want. It's been done. We're not planning to ship with this
requirement, though.
The plan for Mozilla 0.9 is to break out that component's dialog-posing
code into a new interface (actually, for this component, I believe we
just need to add three new methods to its extant UI-posing interface,
nsIHelperAppLauncherDialog.idl) and alter the internal code to use the
interface, rather than posing the dialogs directly. This needs to happen
to the ucth component and several others.
An embedding application (or a Mozilla installation with unique UI
requirements) wanting to override that UI would still need to write its
own component, but now it need only implement the
nsIHelperAppLauncherDialog interface (requirements documentation is
going to be kind of important and no doubt done last), and register its
version of that interface with the component manager at startup, to
override the default implementation.
This is described in a little more detail at
http://www.mozilla.org/xpfe/embedding-dialogs.html#posedialog , though
there's nothing like sample code there.