Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions
nsUnknownContentTypeHandler Class Reference

#include <nsUnknownContentTypeHandler.h>

Inheritance diagram for nsUnknownContentTypeHandler:
Inheritance graph
Collaboration diagram for nsUnknownContentTypeHandler:
Collaboration graph

List of all members.

Public Member Functions

 nsUnknownContentTypeHandler ()
virtual ~nsUnknownContentTypeHandler ()
void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext, in unsigned long aReason)
nsILocalFile promptForSaveToFile (in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension)

Public Attributes

const unsigned long REASON_CANTHANDLE = 0
 This request is passed to the helper app dialog because Gecko can not handle content of this type.
const unsigned long REASON_SERVERREQUEST = 1
 The server requested external handling.
const unsigned long REASON_TYPESNIFFED = 2
 Gecko detected that the type sent by the server (e.g.

Private Member Functions

PtWidget_t * GetWebBrowser (nsIDOMWindow *aWindow)

Detailed Description

Definition at line 54 of file nsUnknownContentTypeHandler.h.

Constructor & Destructor Documentation

  • ATENTIE */ printf( "In nsUnknownContentTypeHandler constructor\n" );

Definition at line 53 of file nsUnknownContentTypeHandler.cpp.

  • ATENTIE */ printf( "In nsUnknownContentTypeHandler destr\n" );

Definition at line 58 of file nsUnknownContentTypeHandler.cpp.


Member Function Documentation

PtWidget_t * nsUnknownContentTypeHandler::GetWebBrowser ( nsIDOMWindow aWindow) [private]

Definition at line 142 of file nsUnknownContentTypeHandler.cpp.

  nsCOMPtr<nsIWebBrowserChrome> chrome;
  PtWidget_t *val = 0;

  nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(";1"));
  if (!wwatch) return nsnull;

  if( wwatch ) {
    nsCOMPtr<nsIDOMWindow> fosterParent;
    if (!aWindow) { // it will be a dependent window. try to find a foster parent.
      aWindow = fosterParent;
    wwatch->GetChromeForWindow(aWindow, getter_AddRefs(chrome));

  if (chrome) {
    nsCOMPtr<nsIEmbeddingSiteWindow> site(do_QueryInterface(chrome));
    if (site) {
      site->GetSiteWindow(reinterpret_cast<void **>(&val));

  return val;

Here is the call graph for this function:

nsILocalFile nsIHelperAppLauncherDialog::promptForSaveToFile ( in nsIHelperAppLauncher  aLauncher,
in nsISupports  aWindowContext,
in wstring  aDefaultFile,
in wstring  aSuggestedFileExtension 
) [inherited]
void nsIHelperAppLauncherDialog::show ( in nsIHelperAppLauncher  aLauncher,
in nsISupports  aContext,
in unsigned long  aReason 
) [inherited]

Member Data Documentation

This request is passed to the helper app dialog because Gecko can not handle content of this type.

Definition at line 62 of file nsIHelperAppLauncherDialog.idl.

The server requested external handling.

Definition at line 67 of file nsIHelperAppLauncherDialog.idl.

Gecko detected that the type sent by the server (e.g.

text/plain) does not match the actual type.

Definition at line 73 of file nsIHelperAppLauncherDialog.idl.

The documentation for this class was generated from the following files: