updating to work with the newest build of Mozilla

kmeleon10_branch
binaryc 21 years ago
parent f02602e16c
commit 05959fe32a
  1. 24
      k-meleon/BrowserFrameGlue.cpp
  2. 6
      k-meleon/BrowserFrm.cpp
  3. 7
      k-meleon/BrowserFrm.h
  4. 26
      k-meleon/BrowserImpl.cpp
  5. 3
      k-meleon/BrowserImpl.h
  6. 26
      k-meleon/BrowserViewUtils.cpp
  7. 8
      k-meleon/IBrowserFrameGlue.h
  8. 28
      k-meleon/KMeleon.dsp
  9. 58
      k-meleon/MfcEmbed.cpp
  10. 1
      k-meleon/PrintProgressDialog.h
  11. 145
      k-meleon/StdAfx.h
  12. 26
      k-meleon/UnknownContentTypeHandler.cpp
  13. 23
      k-meleon/UnknownContentTypeHandler.h

@ -120,7 +120,7 @@ void CBrowserFrame::BrowserFrameGlueObj::GetBrowserFrameTitle(PRUnichar **aTitle
nsString nsTitle;
nsTitle.AssignWithConversion(title.GetBuffer(0));
*aTitle = nsTitle.ToNewUnicode();
*aTitle = ToNewUnicode(nsTitle);
}
}
@ -455,3 +455,25 @@ void CBrowserFrame::BrowserFrameGlueObj::UpdateSecurityStatus(PRInt32 aState)
pThis->UpdateSecurityStatus(aState);
}
void CBrowserFrame::BrowserFrameGlueObj::ShowTooltip(PRInt32 x, PRInt32 y, const char *text)
{
METHOD_PROLOGUE(CBrowserFrame, BrowserFrameGlueObj)
if (text) {
POINT point;
point.x = x;
point.y = y;
pThis->m_wndBrowserView.ClientToScreen(&point);
pThis->ScreenToClient(&point);
point.y += 20; // jump to below the cursor, otherwise we appear right on top of the cursor
pThis->m_tooltip.SetWindowText(text);
pThis->m_tooltip.SetWindowPos(NULL, point.x, point.y, 8*strlen(text), GetSystemMetrics(SM_CYCAPTION), SWP_NOZORDER | SWP_DRAWFRAME);
pThis->m_tooltip.ShowWindow(SW_SHOW);
} else {
pThis->m_tooltip.ShowWindow(SW_HIDE);
}
}

@ -325,7 +325,11 @@ int CBrowserFrame::OnCreate(LPCREATESTRUCT lpCreateStruct){
// Note that the window styles (WM_RESIZE etc) are set inside
// of PreCreateWindow()
SetupFrameChrome();
SetupFrameChrome();
// Create a tooltip control that centers its text horizontally.
m_tooltip.Create(_T("Tooltip"), WS_CHILD|SS_CENTER,
CRect(10,10,150,50), this);
return 0;
}

@ -157,8 +157,8 @@ public:
// be displayed in
CBrowserView m_wndBrowserView;
void UpdateSecurityStatus(PRInt32 aState);
void ShowSecurityInfo();
// note: right now it's just a CStatic, but eventually it will become something better
CStatic m_tooltip;
// This specifies what UI elements this frame will sport
// w.r.t. toolbar, statusbar, urlbar etc.
@ -166,6 +166,9 @@ public:
BOOL m_created; // set after we are created
void UpdateSecurityStatus(PRInt32 aState);
void ShowSecurityInfo();
protected:
//
// This nested class implements the IBrowserFramGlue interface

@ -106,6 +106,7 @@ NS_INTERFACE_MAP_BEGIN(CBrowserImpl)
NS_INTERFACE_MAP_ENTRY(nsIEmbeddingSiteWindow)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_ENTRY(nsIContextMenuListener)
NS_INTERFACE_MAP_ENTRY(nsITooltipListener)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_END
@ -411,3 +412,28 @@ NS_IMETHODIMP CBrowserImpl::SetVisibility(PRBool aVisibility)
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnShowTooltip(PRInt32 x, PRInt32 y, const PRUnichar * tipText)
{
USES_CONVERSION;
if(! m_pBrowserFrameGlue)
return NS_ERROR_FAILURE;
char *text = W2A(tipText);
m_pBrowserFrameGlue->ShowTooltip(x, y, text);
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnHideTooltip()
{
if(! m_pBrowserFrameGlue)
return NS_ERROR_FAILURE;
m_pBrowserFrameGlue->ShowTooltip(0, 0, nsnull);
return NS_OK;
}

@ -25,7 +25,6 @@
#define _BROWSERIMPL_H
#include "IBrowserFrameGlue.h"
#include "nsIWebBrowserChromeFocus.h"
class CBrowserImpl : public nsIInterfaceRequestor,
public nsIWebBrowserChrome,
@ -33,6 +32,7 @@ class CBrowserImpl : public nsIInterfaceRequestor,
public nsIEmbeddingSiteWindow,
public nsIWebProgressListener,
public nsIContextMenuListener,
public nsITooltipListener,
public nsSupportsWeakReference
{
public:
@ -48,6 +48,7 @@ public:
NS_DECL_NSIEMBEDDINGSITEWINDOW
NS_DECL_NSIWEBPROGRESSLISTENER
NS_DECL_NSICONTEXTMENULISTENER
NS_DECL_NSITOOLTIPLISTENER
protected:

@ -44,8 +44,13 @@ BOOL CBrowserView::OpenViewSourceWindow(const char* pUrl)
char *tempfile = GetTempFile();
nsCOMPtr<nsIWebBrowserPersist> persist(do_QueryInterface(mWebBrowser));
if(persist) {
persist->SaveDocument(nsnull, tempfile, 0);
if(persist)
{
nsCOMPtr<nsILocalFile> file;
NS_NewLocalFile(T2A(tempfile), TRUE, getter_AddRefs(file));
persist->SaveDocument(nsnull, file, nsnull);
char *command = new char[theApp.preferences.sourceCommand.GetLength() + strlen(tempfile) +2];
@ -206,11 +211,18 @@ NS_IMETHODIMP CBrowserView::URISaveAs(nsIURI* aURI, bool bDocument)
// Save the file
nsCOMPtr<nsIWebBrowserPersist> persist(do_QueryInterface(mWebBrowser));
if(persist) {
if (bDocument)
persist->SaveDocument(nsnull, pStrFullPath, pStrDataPath);
else
persist->SaveURI(aURI, nsnull, strFullPath);
if(persist)
{
nsCOMPtr<nsILocalFile> file;
NS_NewLocalFile(T2A(pStrFullPath), TRUE, getter_AddRefs(file));
nsCOMPtr<nsILocalFile> dataPath;
if (pStrDataPath)
{
NS_NewLocalFile(pStrDataPath, TRUE, getter_AddRefs(dataPath));
}
persist->SaveDocument(nsnull, file, dataPath);
}
}

@ -42,7 +42,7 @@ struct IBrowserFrameGlue {
virtual void UpdateProgress(PRInt32 aCurrent, PRInt32 aMax) = 0;
virtual void UpdateBusyState(PRBool aBusy) = 0;
virtual void UpdateCurrentURI(nsIURI *aLocation) = 0;
virtual void UpdateSecurityStatus(PRInt32 aState) = 0;
virtual void UpdateSecurityStatus(PRInt32 aState) = 0;
// BrowserFrame Related Methods
@ -71,6 +71,9 @@ struct IBrowserFrameGlue {
//Prompt Related Methods
virtual HWND GetBrowserFrameNativeWnd() = 0;
// Tooltip function
virtual void ShowTooltip(PRInt32 x, PRInt32 y, const char *text) = 0;
};
#define NS_DECL_BROWSERFRAMEGLUE \
@ -97,7 +100,8 @@ struct IBrowserFrameGlue {
virtual void FocusAvailable(PRBool *aFocusAvail); \
virtual void GetBrowserFrameVisibility(PRBool *aVisible); \
virtual void ShowContextMenu(PRUint32 aContextFlags, nsIDOMNode *aNode); \
virtual HWND GetBrowserFrameNativeWnd();
virtual HWND GetBrowserFrameNativeWnd(); \
virtual void ShowTooltip(PRInt32 x, PRInt32 y, const char *text);
typedef IBrowserFrameGlue *PBROWSERFRAMEGLUE;

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "\projects\mozilla\mozilla\dist\include" /I "\projects\mozilla\mozilla\dist\WIN32_O.OBJ\include" /D _WIN32_IE=0x0500 /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "/projects/mozilla/mozilla/dist/include/docshell" /I "/projects/mozilla/mozilla/dist/include/dom" /I "/projects/mozilla/mozilla/dist/include/embed_base" /I "/projects/mozilla/mozilla/dist/include/exthandler" /I "/projects/mozilla/mozilla/dist/include/find" /I "/projects/mozilla/mozilla/dist/include/gfx" /I "/projects/mozilla/mozilla/dist/include/helperAppDlg" /I "/projects/mozilla/mozilla/dist/include/necko" /I "/projects/mozilla/mozilla/dist/include/pref" /I "/projects/mozilla/mozilla/dist/include/profile" /I "/projects/mozilla/mozilla/dist/include/shistory" /I "/projects/mozilla/mozilla/dist/include/string" /I "/projects/mozilla/mozilla/dist/include/uriloader" /I "/projects/mozilla/mozilla/dist/include/wallet" /I "/projects/mozilla/mozilla/dist/include/webBrowser_core" /I "/projects/mozilla/mozilla/dist/include/webshell" /I "/projects/mozilla/mozilla/dist/include/widget" /I "/projects/mozilla/mozilla/dist/include/xpcom" /I "\projects\mozilla\mozilla\dist\include" /I "\projects\mozilla\mozilla\dist\WIN32_O.OBJ\include" /D _WIN32_IE=0x0500 /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /Fr /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
@ -65,8 +65,8 @@ PostBuild_Cmds=version BUILD_NUMBER version.h
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "kmeleon___Win32_Debug"
# PROP BASE Intermediate_Dir "kmeleon___Win32_Debug"
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
@ -75,7 +75,7 @@ PostBuild_Cmds=version BUILD_NUMBER version.h
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "\projects\mozilla\mozilla\dist\include" /I "\projects\mozilla\mozilla\dist\WIN32_O.OBJ\include" /D "_DEBUG" /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "/projects/mozilla/mozilla/dist/include/docshell" /I "/projects/mozilla/mozilla/dist/include/dom" /I "/projects/mozilla/mozilla/dist/include/embed_base" /I "/projects/mozilla/mozilla/dist/include/exthandler" /I "/projects/mozilla/mozilla/dist/include/find" /I "/projects/mozilla/mozilla/dist/include/gfx" /I "/projects/mozilla/mozilla/dist/include/helperAppDlg" /I "/projects/mozilla/mozilla/dist/include/necko" /I "/projects/mozilla/mozilla/dist/include/pref" /I "/projects/mozilla/mozilla/dist/include/profile" /I "/projects/mozilla/mozilla/dist/include/shistory" /I "/projects/mozilla/mozilla/dist/include/string" /I "/projects/mozilla/mozilla/dist/include/uriloader" /I "/projects/mozilla/mozilla/dist/include/wallet" /I "/projects/mozilla/mozilla/dist/include/webBrowser_core" /I "/projects/mozilla/mozilla/dist/include/webshell" /I "/projects/mozilla/mozilla/dist/include/widget" /I "/projects/mozilla/mozilla/dist/include/xpcom" /I "\projects\mozilla\mozilla\dist\include" /I "\projects\mozilla\mozilla\dist\WIN32_O.OBJ\include" /D "_DEBUG" /D "XP_WIN" /D "XP_WIN32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HW_THREADS" /D "XP_PC" /D WINVER=0x400 /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /I /projects/mozilla/mozilla/dist/include/docshell" /I /projects/mozilla/mozilla/dist/include/dom" /I /projects/mozilla/mozilla/dist/include/embed_base" /I /projects/mozilla/mozilla/dist/include/exthandler" /I /projects/mozilla/mozilla/dist/include/find" /I /projects/mozilla/mozilla/dist/include/gfx" /I /projects/mozilla/mozilla/dist/include/helperAppDlg" /I /projects/mozilla/mozilla/dist/include/necko" /I /projects/mozilla/mozilla/dist/include/pref" /I /projects/mozilla/mozilla/dist/include/profile" /I /projects/mozilla/mozilla/dist/include/shistory" /I /projects/mozilla/mozilla/dist/include/string" /I /projects/mozilla/mozilla/dist/include/uriloader" /I /projects/mozilla/mozilla/dist/include/wallet" /I /projects/mozilla/mozilla/dist/include/webBrowser_core" /I /projects/mozilla/mozilla/dist/include/webshell" /I /projects/mozilla/mozilla/dist/include/widget" /I /projects/mozilla/mozilla/dist/include/xpcom" /GZ " " " " " " " " " " " " " " " " " " /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
@ -219,7 +219,17 @@ SOURCE=.\ReBarEx.cpp
# Begin Source File
SOURCE=.\StdAfx.cpp
!IF "$(CFG)" == "kmeleon - Win32 Release"
# ADD CPP /Yc"stdafx.h"
!ELSEIF "$(CFG)" == "kmeleon - Win32 Debug"
# ADD CPP /Yc
!ENDIF
# End Source File
# Begin Source File
@ -353,9 +363,17 @@ SOURCE=.\version.h
!IF "$(CFG)" == "kmeleon - Win32 Release"
# PROP Ignore_Default_Tool 1
# Begin Custom Build - Updating Version
InputPath=.\version.h
"$(InputPath)" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
version.exe BUILD_NUMBER $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "kmeleon - Win32 Debug"
# PROP Ignore_Default_Tool 1
# Begin Custom Build - Updating Version
InputPath=.\version.h

@ -47,10 +47,10 @@
#include "winEmbedFileLocProvider.h"
#include "ProfileMgr.h"
#include "BrowserImpl.h"
#include "nsIWindowWatcher.h"
#include "kmeleonConst.h"
#include "UnknownContentTypeHandler.h"
#include "Utils.h"
#include "Tooltips.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@ -68,6 +68,13 @@ static char THIS_FILE[] = __FILE__;
{0xa2112d6a, 0x0e28, 0x421f, {0xb4, 0x6a, 0x25, 0xc0, 0xb3, 0x8, 0xcb, 0xd0}}
static NS_DEFINE_CID(kPromptServiceCID, NS_PROMPTSERVICE_CID);
// this is for overriding the Mozilla default HelperAppLauncherDialog
#define NS_HELPERAPPLAUNCHERDIALOG_CID \
{0xf68578eb, 0x6ec2, 0x4169, {0xae, 0x19, 0x8c, 0x62, 0x43, 0xf0, 0xab, 0xe1}}
static NS_DEFINE_CID(kHelperAppLauncherDialogCID, NS_HELPERAPPLAUNCHERDIALOG_CID);
BEGIN_MESSAGE_MAP(CMfcEmbedApp, CWinApp)
//{{AFX_MSG_MAP(CMfcEmbedApp)
ON_COMMAND(ID_NEW_BROWSER, OnNewBrowser)
@ -131,37 +138,28 @@ nsresult CMfcEmbedApp::OverrideComponents()
promptFactory,
PR_TRUE); // replace existing
} else
::FreeLibrary(overlib);
::FreeLibrary(overlib);
}
// Override the UnknownContentHandler
nsCOMPtr<nsIFactory> unkFactory;
rv = NewUnknownContentHandlerFactory(getter_AddRefs(unkFactory));
if (NS_FAILED(rv)) return rv;
rv = nsComponentManager::RegisterFactory(kUnknownContentTypeHandlerCID,
NS_IUNKNOWNCONTENTTYPEHANDLER_CLASSNAME,
NS_IUNKNOWNCONTENTTYPEHANDLER_CONTRACTID ,
unkFactory,
PR_TRUE); // replace existing
rv = nsComponentManager::RegisterFactory(kUnknownContentTypeHandlerCID,
NS_IHELPERAPPLAUNCHERDLG_CLASSNAME,
NS_IHELPERAPPLAUNCHERDLG_CONTRACTID,
unkFactory,
PR_TRUE); // replace existing
/*
// Override the nsIHelperAppLauncherDialog
nsCOMPtr<nsIFactory> helpFactory;
rv = NewUnknownContentHandlerFactory(getter_AddRefs(helpFactory));
if (NS_FAILED(rv)) return rv;
rv = nsComponentManager::RegisterFactory(kHelperAppLauncherDialogCID,
NS_IHELPERAPPLAUNCHERDLG_CLASSNAME,
NS_IHELPERAPPLAUNCHERDLG_CONTRACTID,
helpFactory,
PR_TRUE); // replace existing
*/
nsCOMPtr<nsIFactory> helperAppDlgFactory;
rv = NewUnknownContentHandlerFactory(getter_AddRefs(helperAppDlgFactory));
if (NS_SUCCEEDED(rv))
nsComponentManager::RegisterFactory(kHelperAppLauncherDialogCID,
"Helper App Launcher Dialog",
"@mozilla.org/helperapplauncherdialog;1",
helperAppDlgFactory,
PR_TRUE); // replace existing
nsCOMPtr<nsIFactory> tooltipTextProviderFactory;
rv = NewTooltipTextProviderFactory(getter_AddRefs(tooltipTextProviderFactory));
if (NS_SUCCEEDED(rv))
nsComponentManager::RegisterFactory(kTooltipTextProviderCID,
"Tooltip Text Provider",
"@mozilla.org/embedcomp/tooltiptextprovider;1",
tooltipTextProviderFactory,
PR_TRUE); // replace existing
return rv;
}

@ -7,7 +7,6 @@
// PrintProgressDialog.h : header file
//
#include "nsIPrintListener.h"
class nsIWebBrowser;
class nsIDOMWindow;
class nsIPrintListener;

@ -46,61 +46,122 @@
#include <afxole.h>
#include "nsIWidget.h"
#include "nsCOMPtr.h"
#include "nsNetUtil.h"
#include "nsString.h"
#include "nsVoidArray.h"
#include "nsCWebBrowser.h"
#include "nsXPIDLString.h"
#include "nsWidgetsCID.h"
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
//}}AFX_INSERT_LOCATION
// Please don't change the line below, I have a perl script that depends on it being here :)
// - BEGIN MOZILLA INCLUDES -
// Additional include directories:
// /projects/mozilla/mozilla/dist/include/docshell, /projects/mozilla/mozilla/dist/include/dom, /projects/mozilla/mozilla/dist/include/embed_base, /projects/mozilla/mozilla/dist/include/exthandler, /projects/mozilla/mozilla/dist/include/find, /projects/mozilla/mozilla/dist/include/gfx, /projects/mozilla/mozilla/dist/include/helperAppDlg, /projects/mozilla/mozilla/dist/include/intl, /projects/mozilla/mozilla/dist/include/layout, /projects/mozilla/mozilla/dist/include/necko, /projects/mozilla/mozilla/dist/include/pref, /projects/mozilla/mozilla/dist/include/profile, /projects/mozilla/mozilla/dist/include/shistory, /projects/mozilla/mozilla/dist/include/string, /projects/mozilla/mozilla/dist/include/uriloader, /projects/mozilla/mozilla/dist/include/wallet, /projects/mozilla/mozilla/dist/include/webBrowser_core, /projects/mozilla/mozilla/dist/include/webshell, /projects/mozilla/mozilla/dist/include/widget, /projects/mozilla/mozilla/dist/include/windowwatcher, /projects/mozilla/mozilla/dist/include/xpcom,
// docshell:
#include "nsIDocShell.h"
#include "nsIWebBrowser.h"
#include "nsIBaseWindow.h"
#include "nsIWebNavigation.h"
#include "nsIWebBrowserChrome.h"
#include "nsIWebProgressListener.h"
#include "nsIWebProgress.h"
#include "nsIWindowCreator.h"
#include "nsIInterfaceRequestor.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocShellTreeItem.h"
#include "nsIClipboardCommands.h"
#include "nsIWebBrowserPersist.h"
#include "nsIContextMenuListener.h"
#include "nsIDOMNode.h"
// dom:
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMNode.h"
#include "nsIDOMNamedNodeMap.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsReadableUtils.h"
#include "nsIScriptGlobalObject.h"
#include "nsIDOMWindow.h"
#include "nsIDOMWindowInternal.h"
// embed_base:
#include "nsIWindowCreator.h"
#include "nsEmbedAPI.h"
// exthandler:
#include "nsIExternalHelperAppService.h"
// find:
#include "nsIWebBrowserFind.h"
// gfx:
#include "nsIPrintOptions.h"
// helperAppDlg:
#include "nsIHelperAppLauncherDialog.h"
// intl:
#include "nsIStringBundle.h"
// layout:
#include "nsIPrintListener.h"
// necko:
#include "nsIPrompt.h"
#include "nsIWalletService.h"
#include "nsEmbedAPI.h"
#include "nsISHistory.h"
#include "nsISHEntry.h"
#include "nsIHTTPChannel.h"
#include "nsIURI.h"
#include "nsIRequestObserver.h"
#include "nsIChannel.h"
#include "nsNetUtil.h"
// pref:
#include "nsIPref.h"
#include "nsAppDirectoryServiceDefs.h"
// profile:
#include "nsIProfileChangeStatus.h"
#include "nsIObserverService.h"
#include "nsError.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "nsIEmbeddingSiteWindow.h"
#include "nsIWebBrowserFind.h"
#include "nsIWebBrowserFocus.h"
// shistory:
#include "nsISHistory.h"
#include "nsIHistoryEntry.h"
#include "nsISHEntry.h"
// string:
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
#include "nsString.h"
// uriloader:
#include "nsIWebProgress.h"
#include "nsIWebProgressListener.h"
// wallet:
#include "nsIWalletService.h"
// Printing
#include "nsIPrintOptions.h"
// webBrowser_core:
#include "nsIWebBrowserChrome.h"
#include "nsITooltipListener.h"
#include "nsITooltipTextProvider.h"
#include "nsCTooltipTextProvider.h"
#include "nsIWebBrowserPersist.h"
#include "nsIWebBrowser.h"
#include "nsIWebBrowserFocus.h"
#include "nsCWebBrowser.h"
#include "nsIWebBrowserChromeFocus.h"
#include "nsIContextMenuListener.h"
#include "nsIWebBrowserPrint.h"
#include "nsIDOMWindow.h"
#include "nsIEmbeddingSiteWindow.h"
// Unknown Content Type Handler
#include "nsIUnkContentTypeHandler.h"
#include "nsIHelperAppLauncherDialog.h"
#include "nsIExternalHelperAppService.h"
#include "nsIHelperAppLauncherDialog.h"
// webshell:
#include "nsIClipboardCommands.h"
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
// widget:
#include "nsIBaseWindow.h"
#include "nsWidgetsCID.h"
#include "nsIFilePicker.h"
#include "nsIWidget.h"
// windowwatcher:
#include "nsIWindowWatcher.h"
// xpcom:
#include "nsAppDirectoryServiceDefs.h"
#include "nsWeakReference.h"
#include "nsIGenericFactory.h"
#include "nsIObserver.h"
#include "nsIInterfaceRequestor.h"
#include "nsVoidArray.h"
#include "nsError.h"
#include "nsIObserverService.h"
#include "nsCOMPtr.h"
// - END MOZILLA INCLUDES -
// Please don't change the line above, I have a perl script that depends on it being here :)
#endif //_STDAFX_H

@ -29,25 +29,6 @@
#include "MfcEmbed.h"
extern CMfcEmbedApp theApp;
// HandleUnknownContentType (from nsIUnknownContentTypeHandler) implementation.
// XXX We can get the content type from the channel now so that arg could be dropped.
NS_IMETHODIMP
CUnknownContentTypeHandler::HandleUnknownContentType( nsIRequest *request,
const char *aContentType,
nsIDOMWindowInternal *aWindow ) {
nsresult rv = NS_OK;
nsCOMPtr<nsIChannel> aChannel;
nsCOMPtr<nsISupports> channel;
nsCAutoString contentDisp;
// this function never seems to get called...
MessageBox(NULL, "CHandleUnknownContentType()", NULL, MB_OK);
return rv;
}
NS_IMETHODIMP
CUnknownContentTypeHandler::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext ) {
@ -182,10 +163,6 @@ CUnknownContentTypeHandler::PromptForSaveToFile(nsISupports * aWindowContext, co
NS_GENERIC_FACTORY_CONSTRUCTOR(CUnknownContentTypeHandler)
static nsModuleComponentInfo components[] = {
{ NS_IUNKNOWNCONTENTTYPEHANDLER_CLASSNAME,
NS_UNKNOWNCONTENTTYPEHANDLER_CID,
NS_IUNKNOWNCONTENTTYPEHANDLER_CONTRACTID,
CUnknownContentTypeHandlerConstructor },
{ NS_IHELPERAPPLAUNCHERDLG_CLASSNAME,
NS_UNKNOWNCONTENTTYPEHANDLER_CID,
NS_IHELPERAPPLAUNCHERDLG_CONTRACTID,
@ -195,8 +172,7 @@ static nsModuleComponentInfo components[] = {
NS_IMPL_NSGETMODULE("CUnknownContentTypeHandler", components )
/* nsISupports Implementation for the class */
NS_IMPL_ISUPPORTS2(CUnknownContentTypeHandler,
nsIUnknownContentTypeHandler,
NS_IMPL_ISUPPORTS1(CUnknownContentTypeHandler,
nsIHelperAppLauncherDialog)

@ -1,22 +1,5 @@
#include "stdafx.h"
#include "nsString.h"
#include "nsIDOMWindowInternal.h"
#include "nsIScriptGlobalObject.h"
#include "nsIChannel.h"
#include "nsIURI.h"
#include "nsIRequestObserver.h"
#include "nsIHTTPChannel.h"
#include "nsXPIDLString.h"
#include "nsIInterfaceRequestor.h"
#include "nsIExternalHelperAppService.h"
#include "nsIStringBundle.h"
#include "nsIFilePicker.h"
#include "nsIPref.h"
#include "nsIGenericFactory.h"
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
// {42770B50-03E9-11d3-8068-00600811A9C3}
@ -24,8 +7,7 @@ static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
{ 0x42770b50, 0x3e9, 0x11d3, { 0x80, 0x68, 0x0, 0x60, 0x8, 0x11, 0xa9, 0xc3 } }
static NS_DEFINE_CID(kUnknownContentTypeHandlerCID, NS_UNKNOWNCONTENTTYPEHANDLER_CID);
class CUnknownContentTypeHandler : public nsIUnknownContentTypeHandler,
public nsIHelperAppLauncherDialog {
class CUnknownContentTypeHandler : public nsIHelperAppLauncherDialog {
public:
NS_DEFINE_STATIC_CID_ACCESSOR( NS_UNKNOWNCONTENTTYPEHANDLER_CID );
@ -39,9 +21,6 @@ public:
// This class implements the nsISupports interface functions.
NS_DECL_ISUPPORTS
// This class implements the nsIUnknownContentTypeHandler interface functions.
NS_DECL_NSIUNKNOWNCONTENTTYPEHANDLER
// This class implements the nsIHelperAppLauncherDialog interface functions.
NS_DECL_NSIHELPERAPPLAUNCHERDIALOG

Loading…
Cancel
Save