diff --git a/webshell/embed/ActiveX/MozillaBrowser.cpp b/webshell/embed/ActiveX/MozillaBrowser.cpp index 4cd4532a03c5..5a71cfb19015 100644 --- a/webshell/embed/ActiveX/MozillaBrowser.cpp +++ b/webshell/embed/ActiveX/MozillaBrowser.cpp @@ -23,6 +23,8 @@ #include "stdafx.h" #include #include +#include +#include #include "MozillaControl.h" #include "MozillaBrowser.h" @@ -77,6 +79,7 @@ CMozillaBrowser::CMozillaBrowser() // Initialize layout interfaces m_pIWebShell = nsnull; + m_pIPref = nsnull; m_pIServiceManager = nsnull; @@ -132,7 +135,7 @@ STDMETHODIMP CMozillaBrowser::InterfaceSupportsErrorInfo(REFIID riid) &IID_IWebBrowser2, &IID_IWebBrowserApp }; - for (int i=0;i': + case '<': + case '?': + break; + case '.': + if (szTmp[i+1] != '\0') { + szFile[j] = '_'; + j++; + } + break; + case '/': + szFile[j] = '-'; + j++; + break; + default: + szFile[j] = szTmp[i]; + j++; + } + } + szFile[j] = '\0'; + + HRESULT res = S_OK; + if ( GetSaveFileName(&SaveFileName) ) { + //Get the current DOM document + nsIDOMDocument* pDocument = nsnull; + res = GetDOMDocument(&pDocument); + if ( FAILED(res) ) + return res; + + //Get an nsIDiskDocument interface to the DOM document + nsCOMPtr diskDoc = do_QueryInterface(pDocument); + if (!diskDoc) + return E_NOINTERFACE; + + //Set the file type specified by the user + //Add the correct file extension if none is specified + nsIDiskDocument::ESaveFileType saveFileType; + if ( SaveFileName.nFilterIndex == 2 ) //SaveAs text file + saveFileType = nsIDiskDocument::eSaveFileText; + else //SaveAs html file + saveFileType = nsIDiskDocument::eSaveFileHTML; + + //Create an nsFilelSpec from the selected file path. + nsFileSpec fileSpec(szFile, PR_FALSE); + + //Save the file. + res = diskDoc->SaveFile(&fileSpec, PR_TRUE, PR_TRUE, saveFileType, ""); + } + return res; } LRESULT CMozillaBrowser::OnProperties(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { + NG_TRACE_METHOD(CMozillaBrowser::OnProperties); + MessageBox(_T("No Properties Yet!"), _T("Control Message"), MB_OK); // TODO show the properties dialog return 0; @@ -320,6 +422,8 @@ LRESULT CMozillaBrowser::OnProperties(WORD wNotifyCode, WORD wID, HWND hWndCtl, LRESULT CMozillaBrowser::OnCut(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { + NG_TRACE_METHOD(CMozillaBrowser::OnCut); + nsresult res; nsIPresShell* pIPresShell = nsnull; @@ -345,6 +449,8 @@ LRESULT CMozillaBrowser::OnCut(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& b LRESULT CMozillaBrowser::OnCopy(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { + NG_TRACE_METHOD(CMozillaBrowser::OnCopy); + nsresult res; nsIPresShell* pIPresShell = nsnull; @@ -362,6 +468,8 @@ LRESULT CMozillaBrowser::OnCopy(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& LRESULT CMozillaBrowser::OnPaste(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { + NG_TRACE_METHOD(CMozillaBrowser::OnPaste); + MessageBox(_T("No Paste Yet!"), _T("Control Message"), MB_OK); // TODO enable pasting return 0; @@ -369,6 +477,8 @@ LRESULT CMozillaBrowser::OnPaste(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& LRESULT CMozillaBrowser::OnSelectAll(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { + NG_TRACE_METHOD(CMozillaBrowser::OnSelectAll); + MessageBox(_T("No Select All Yet!"), _T("Control Message"), MB_OK); // TODO enable Select All return 0; @@ -376,7 +486,9 @@ LRESULT CMozillaBrowser::OnSelectAll(WORD wNotifyCode, WORD wID, HWND hWndCtl, B // Handle ID_VIEWSOURCE command LRESULT CMozillaBrowser::OnViewSource(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) -{ +{ + NG_TRACE_METHOD(CMozillaBrowser::OnViewSource); + // Get the url from the web shell const PRUnichar *pszUrl = nsnull; PRInt32 aHistoryIndex; @@ -438,10 +550,11 @@ LRESULT CMozillaBrowser::OnViewSource(WORD wNotifyCode, WORD wID, HWND hWndCtl, // Test if the browser is in a valid state BOOL CMozillaBrowser::IsValid() { + NG_TRACE_METHOD(CMozillaBrowser::IsValid); + return (m_pIWebShell == nsnull) ? FALSE : TRUE; } - ///////////////////////////////////////////////////////////////////////////// static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); @@ -525,7 +638,7 @@ HRESULT CMozillaBrowser::TermWebShell() // Create and initialise the web shell HRESULT CMozillaBrowser::CreateWebShell() -{ +{ NG_TRACE_METHOD(CMozillaBrowser::CreateWebShell); if (m_pIWebShell != nsnull) @@ -544,7 +657,7 @@ HRESULT CMozillaBrowser::CreateWebShell() nsresult rv; - // Load preferences + // Load preferences service rv = nsServiceManager::GetService(kPrefCID, nsIPref::GetIID(), (nsISupports **)&m_pIPref); @@ -555,6 +668,10 @@ HRESULT CMozillaBrowser::CreateWebShell() m_sErrorMessage = _T("Error - could not create preference object"); return E_FAIL; } + else { + rv = m_pIPref->StartUp(); //Initialize the preference service + rv = m_pIPref->ReadUserPrefs(); //Reads from default_prefs.js + } // Create the web shell object rv = nsComponentManager::CreateInstance(kWebShellCID, nsnull, @@ -568,6 +685,13 @@ HRESULT CMozillaBrowser::CreateWebShell() return E_FAIL; } + // Register the cookie service + NS_WITH_SERVICE(nsICookieService, cookieService, kCookieServiceCID, &rv); + if (NS_FAILED(rv) || (cookieService == nsnull)) { + NG_TRACE(_T("Could not register the cookie manager. rv=%08x\n"), (int) rv); + } + // TODO make the cookie service persistent. Currently does not save or load cookies to/from disk. + // Initialise the web shell, making it fit the control dimensions nsRect r; @@ -585,6 +709,7 @@ HRESULT CMozillaBrowser::CreateWebShell() nsScrollPreference_kAuto, aAllowPlugins, aIsSunkenBorder); + NG_ASSERT(NS_SUCCEEDED(rv)); // Create the container object @@ -606,6 +731,8 @@ HRESULT CMozillaBrowser::CreateWebShell() // Turns the editor mode on or off HRESULT CMozillaBrowser::SetEditorMode(BOOL bEnabled) { + NG_TRACE_METHOD(CMozillaBrowser::SetEditorMode); + m_bEditorMode = FALSE; if (bEnabled && m_pEditor == nsnull) { @@ -663,6 +790,8 @@ HRESULT CMozillaBrowser::SetEditorMode(BOOL bEnabled) HRESULT CMozillaBrowser::OnEditorCommand(DWORD nCmdID) { + NG_TRACE_METHOD(CMozillaBrowser::OnEditorCommand); + static nsIAtom * propB = NS_NewAtom("b"); static nsIAtom * propI = NS_NewAtom("i"); static nsIAtom * propU = NS_NewAtom("u"); @@ -731,6 +860,7 @@ HRESULT CMozillaBrowser::OnEditorCommand(DWORD nCmdID) HRESULT CMozillaBrowser::GetPresShell(nsIPresShell **pPresShell) { NG_TRACE_METHOD(CMozillaBrowser::GetPresShell); + nsresult res; // Test for stupid args @@ -776,6 +906,7 @@ HRESULT CMozillaBrowser::GetPresShell(nsIPresShell **pPresShell) HRESULT CMozillaBrowser::GetDOMDocument(nsIDOMDocument **pDocument) { NG_TRACE_METHOD(CMozillaBrowser::GetDOMDocument); + nsresult res; // Test for stupid args @@ -921,6 +1052,8 @@ HRESULT CMozillaBrowser::UnloadBrowserHelpers() HRESULT CMozillaBrowser::InPlaceActivate(LONG iVerb, const RECT* prcPosRect) { + NG_TRACE_METHOD(CMozillaBrowser::InPlaceActivate); + HRESULT hr; if (m_spClientSite == NULL) @@ -1055,6 +1188,8 @@ HRESULT CMozillaBrowser::InPlaceActivate(LONG iVerb, const RECT* prcPosRect) HRESULT STDMETHODCALLTYPE CMozillaBrowser::GetClientSite(IOleClientSite **ppClientSite) { + NG_TRACE_METHOD(CMozillaBrowser::GetClientSite); + NG_ASSERT(ppClientSite); // This fixes a problem in the base class which asserts if the client @@ -1140,7 +1275,6 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::GoHome(void) sUrl = A2T(szBuffer); } } - // Navigate to the home page Navigate(T2OLE(sUrl), NULL, NULL, NULL, NULL); @@ -1167,7 +1301,6 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::GoSearch(void) // TODO find and navigate to the search page stored in prefs // and not this hard coded address } - Navigate(T2OLE(sUrl), NULL, NULL, NULL, NULL); return S_OK; @@ -1215,7 +1348,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Navigate(BSTR URL, VARIANT __RPC_FAR Flags->vt != VT_NULL) { CComVariant vFlags; - if (vFlags.ChangeType(VT_I4, Flags) != S_OK) + if ( vFlags.ChangeType(VT_I4, Flags) != S_OK ) { NG_ASSERT(0); RETURN_E_INVALIDARG(); @@ -1260,7 +1393,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Navigate(BSTR URL, VARIANT __RPC_FAR lFlags &= ~(navOpenInNewWindow); if ((bCancel == VARIANT_FALSE) && spDispNew) { - CIPtr(IWebBrowser2) spOther = spDispNew;; + CIPtr(IWebBrowser2) spOther = spDispNew; if (spOther) { CComVariant vURL(URL); @@ -1291,7 +1424,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Navigate(BSTR URL, VARIANT __RPC_FAR // Load the URL char *tmpCommand = sCommand.ToNewCString(); nsresult res = m_pIWebShell->LoadURL(sUrl.GetUnicode()); - + /* , tmpCommand, pIPostData, bModifyHistory); NS_IMETHOD LoadURL(const PRUnichar *aURLSpec, nsIInputStream* aPostDataStream=nsnull, @@ -1339,7 +1472,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Refresh2(VARIANT __RPC_FAR *Level) if (Level) { CComVariant vLevelAsInt; - if (vLevelAsInt.ChangeType(VT_I4, Level) != S_OK) + if ( vLevelAsInt.ChangeType(VT_I4, Level) != S_OK ) { NG_ASSERT(0); RETURN_E_UNEXPECTED(); @@ -1594,6 +1727,8 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_Left(long Left) NG_ASSERT(0); RETURN_E_UNEXPECTED(); } + + //TODO: Implement put_Left - Should set the left position of this control. return S_OK; } @@ -1938,7 +2073,8 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::get_HWND(long __RPC_FAR *pHWND) RETURN_E_INVALIDARG(); } - //This generates an exception in the IE control. + //This is supposed to return a handle to the IE main window. Since that doesn't exist + //in the control's case, this shouldn't do anything. *pHWND = NULL; return S_OK; } @@ -2079,6 +2215,8 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::get_StatusText(BSTR __RPC_FAR *Status } //TODO: Implement get_StatusText + //NOTE: This function is related to the MS status bar which doesn't exist in this control. Needs more + // investigation, but probably doesn't apply. *StatusText = SysAllocString(L""); return S_OK; } @@ -2095,6 +2233,8 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_StatusText(BSTR StatusText) } //TODO: Implement put_StatusText + //NOTE: This function is related to the MS status bar which doesn't exist in this control. Needs more + // investigation, but probably doesn't apply. return S_OK; } @@ -2235,7 +2375,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Navigate2(VARIANT __RPC_FAR *URL, VAR #endif CComVariant vURLAsString; - if (vURLAsString.ChangeType(VT_BSTR, URL) != S_OK) + if ( vURLAsString.ChangeType(VT_BSTR, URL) != S_OK ) { RETURN_E_INVALIDARG(); } @@ -2483,28 +2623,31 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_RegisterAsDropTarget(VARIANT_BOOL pDropTarget->AddRef(); pDropTarget->SetOwner(this); + // Ask the site if it wants to replace this drop target for another one CIPtr(IDropTarget) spDropTarget; CIPtr(IDocHostUIHandler) spDocHostUIHandler = m_spClientSite; if (spDocHostUIHandler) { - if (spDocHostUIHandler->GetDropTarget(pDropTarget, &spDropTarget) != S_OK) + //if (spDocHostUIHandler->GetDropTarget(pDropTarget, &spDropTarget) != S_OK) + if (spDocHostUIHandler->GetDropTarget(pDropTarget, &spDropTarget) == S_OK) { - spDropTarget = pDropTarget; + m_bDropTarget = TRUE; + ::RegisterDragDrop(m_hWnd, spDropTarget); + //spDropTarget = pDropTarget; } } - if (spDropTarget) + else + //if (spDropTarget) { m_bDropTarget = TRUE; - ::RegisterDragDrop(m_hWnd, spDropTarget); + ::RegisterDragDrop(m_hWnd, pDropTarget); + //::RegisterDragDrop(m_hWnd, spDropTarget); } - pDropTarget->Release(); } - // Now revoke any child window drop targets and pray they aren't // reset by the layout engine. - ::EnumChildWindows(m_hWnd, EnumChildProc, (LPARAM) this); } } @@ -2631,7 +2774,6 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::put_Resizable(VARIANT_BOOL Value) return S_OK; } - /////////////////////////////////////////////////////////////////////////////// // Ole Command Handlers @@ -2648,4 +2790,4 @@ HRESULT _stdcall CMozillaBrowser::EditCommandHandler(CMozillaBrowser *pThis, con { pThis->OnEditorCommand(nCmdID); return S_OK; -} +} \ No newline at end of file diff --git a/webshell/embed/ActiveX/StdAfx.h b/webshell/embed/ActiveX/StdAfx.h index 78996a02cce5..19542012dfdc 100644 --- a/webshell/embed/ActiveX/StdAfx.h +++ b/webshell/embed/ActiveX/StdAfx.h @@ -90,6 +90,7 @@ typedef long int32; #include "nsViewsCID.h" #include "nsString.h" #include "nsCOMPtr.h" +#include "nsICookieService.h" #include "nsIHTTPChannel.h" diff --git a/webshell/embed/ActiveX/WebShellContainer.cpp b/webshell/embed/ActiveX/WebShellContainer.cpp index 3e949899dda5..beb7115a6d2a 100644 --- a/webshell/embed/ActiveX/WebShellContainer.cpp +++ b/webshell/embed/ActiveX/WebShellContainer.cpp @@ -183,6 +183,13 @@ CWebShellContainer::GetChrome(PRUint32& aChromeMaskResult) NS_IMETHODIMP CWebShellContainer::SetTitle(const PRUnichar* aTitle) { + //Fire a title change event + USES_CONVERSION; + LPOLESTR pszConvertedLocationName = W2OLE(const_cast(aTitle)); + BSTR __RPC_FAR LocationName = SysAllocString(pszConvertedLocationName); + m_pEvents1->Fire_TitleChange(LocationName); + m_pEvents2->Fire_TitleChange(LocationName); + return NS_OK; } @@ -199,8 +206,10 @@ CWebShellContainer::GetTitle(const PRUnichar** aResult) NS_IMETHODIMP CWebShellContainer::SetStatus(const PRUnichar* aStatus) { + NG_TRACE_METHOD(CWebShellContainer::SetStatus); + //Gets fired on mouse over link events. BSTR bstrStatus = SysAllocString(W2OLE((PRUnichar *) aStatus)); m_pEvents1->Fire_StatusTextChange(bstrStatus); m_pEvents2->Fire_StatusTextChange(bstrStatus); @@ -237,6 +246,7 @@ NS_IMETHODIMP CWebShellContainer::SetProgress(PRInt32 aProgress, PRInt32 aProgressMax) { NG_TRACE_METHOD(CWebShellContainer::SetProgress); + return NS_OK; } @@ -285,10 +295,6 @@ CWebShellContainer::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL) USES_CONVERSION; NG_TRACE(_T("CWebShellContainer::BeginLoadURL(..., \"%s\")\n"), W2T(aURL)); - // Fire a DownloadBegin - m_pEvents1->Fire_DownloadBegin(); - m_pEvents2->Fire_DownloadBegin(); - // Fire a BeforeNavigate event OLECHAR *pszURL = W2OLE((WCHAR *)aURL); BSTR bstrURL = SysAllocString(pszURL); @@ -320,6 +326,20 @@ CWebShellContainer::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL) { m_pOwner->m_bBusy = TRUE; } + + //NOTE: The IE control fires a DownloadBegin after the first BeforeNavigate. It then fires a + // DownloadComplete after then engine has made it's initial connection to the server. It + // then fires a second DownloadBegin/DownloadComplete pair around the loading of everything + // on the page. These events get fired out of CWebShellContainer::StartDocumentLoad() and + // CWebShellContainer::EndDocumentLoad(). + // We don't appear to distinguish between the initial connection to the server and the + // actual transfer of data. Firing these events here simulates, appeasing applications + // that are expecting that initial pair. + m_pEvents1->Fire_DownloadBegin(); + m_pEvents2->Fire_DownloadBegin(); + m_pEvents1->Fire_DownloadComplete(); + m_pEvents2->Fire_DownloadComplete(); + return NS_OK; } @@ -376,13 +396,12 @@ CWebShellContainer::EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsres CComVariant vURL(bstrURL); m_pEvents2->Fire_NavigateComplete2(m_pOwner, &vURL); - // Fire the new NavigateForward state + // Fire the new NavigateForward state VARIANT_BOOL bEnableForward = VARIANT_FALSE; if ( m_pOwner->m_pIWebShell->CanForward() == NS_OK ) { bEnableForward = VARIANT_TRUE; } - m_pEvents2->Fire_CommandStateChange(CSC_NAVIGATEFORWARD, bEnableForward); // Fire the new NavigateBack state @@ -391,7 +410,6 @@ CWebShellContainer::EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsres { bEnableBack = VARIANT_TRUE; } - m_pEvents2->Fire_CommandStateChange(CSC_NAVIGATEBACK, bEnableBack); m_pOwner->m_bBusy = FALSE; @@ -469,7 +487,7 @@ CWebShellContainer::OnStartRequest(nsIChannel* aChannel, nsISupports* aContext) { USES_CONVERSION; NG_TRACE(_T("CWebShellContainer::OnStartRequest(...)\n")); - + return NS_OK; } @@ -493,7 +511,16 @@ CWebShellContainer::OnStopRequest(nsIChannel* aChannel, nsISupports* aContext, n NS_IMETHODIMP CWebShellContainer::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand) -{ +{ + char* wString = nsnull; + aURL->GetPath(&wString); + USES_CONVERSION; + NG_TRACE(_T("CWebShellContainer::OnStartDocumentLoad(..., %s, \"%s\")\n"),A2CT(wString), A2CT(aCommand)); + + //Fire a DownloadBegin + m_pEvents1->Fire_DownloadBegin(); + m_pEvents2->Fire_DownloadBegin(); + return NS_OK; } @@ -501,6 +528,12 @@ CWebShellContainer::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, NS_IMETHODIMP CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aChannel, nsresult aStatus, nsIDocumentLoaderObserver * aObserver) { + NG_TRACE(_T("CWebShellContainer::OnEndDocumentLoad(..., \"\")\n")); + + //Fire a DownloadComplete + m_pEvents1->Fire_DownloadComplete(); + m_pEvents2->Fire_DownloadComplete(); + char* aString = nsnull; nsIURI* uri = nsnull; @@ -513,7 +546,7 @@ CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aCh return NS_ERROR_NULL_POINTER; } - USES_CONVERSION; + USES_CONVERSION; BSTR bstrURL = SysAllocString(A2OLE((CHAR *) aString)); delete [] aString; // clean up. @@ -523,12 +556,21 @@ CWebShellContainer::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel *aCh m_pEvents2->Fire_DocumentComplete(m_pOwner, &vURL); SysFreeString(bstrURL); + //Fire a StatusTextChange event + BSTR bstrStatus = SysAllocString(A2OLE((CHAR *) "Done")); + m_pEvents1->Fire_StatusTextChange(bstrStatus); + m_pEvents2->Fire_StatusTextChange(bstrStatus); + return NS_OK; } NS_IMETHODIMP CWebShellContainer::OnStartURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel, nsIContentViewer* aViewer) { + NG_TRACE(_T("CWebShellContainer::OnStartURLLoad(..., \"\")\n")); + + //NOTE: This appears to get fired once for each individual item on a page. + return NS_OK; } @@ -541,10 +583,16 @@ CWebShellContainer::OnProgressURLLoad(nsIDocumentLoader* loader, nsIChannel* aCh return NS_OK; } -// we don't care about these. NS_IMETHODIMP CWebShellContainer::OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* aChannel, nsString& aMsg) { + NG_TRACE(_T("CWebShellContainer::OnStatusURLLoad(..., \"\")\n")); + + //NOTE: This appears to get fired for each individual item on a page, indicating the status of that item. + BSTR bstrStatus = SysAllocString(W2OLE((PRUnichar *) aMsg.GetUnicode())); + m_pEvents1->Fire_StatusTextChange(bstrStatus); + m_pEvents2->Fire_StatusTextChange(bstrStatus); + return NS_OK; } @@ -552,6 +600,10 @@ CWebShellContainer::OnStatusURLLoad(nsIDocumentLoader* loader, nsIChannel* aChan NS_IMETHODIMP CWebShellContainer::OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus) { + NG_TRACE(_T("CWebShellContainer::OnEndURLLoad(..., \"\")\n")); + + //NOTE: This appears to get fired once for each individual item on a page. + return NS_OK; } @@ -560,5 +612,4 @@ NS_IMETHODIMP CWebShellContainer::HandleUnknownContentType(nsIDocumentLoader* loader, nsIChannel *aChannel, const char *aContentType, const char *aCommand ) { return NS_OK; -} - +} \ No newline at end of file diff --git a/webshell/embed/ActiveX/guids.cpp b/webshell/embed/ActiveX/guids.cpp index 624f187a3bdb..b49fced78fb1 100644 --- a/webshell/embed/ActiveX/guids.cpp +++ b/webshell/embed/ActiveX/guids.cpp @@ -25,6 +25,7 @@ // Class IDs NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); NS_DEFINE_IID(kHTMLEditorCID, NS_HTMLEDITOR_CID); +NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID); // Interface IDs NS_DEFINE_IID(kIBrowserWindowIID, NS_IBROWSER_WINDOW_IID); diff --git a/webshell/embed/ActiveX/guids.h b/webshell/embed/ActiveX/guids.h index a6e68d588d25..1da347ccf285 100644 --- a/webshell/embed/ActiveX/guids.h +++ b/webshell/embed/ActiveX/guids.h @@ -28,6 +28,7 @@ // Class IDs NS_EXTERN_IID(kEventQueueServiceCID); NS_EXTERN_IID(kHTMLEditorCID); +NS_EXTERN_IID(kCookieServiceCID); // Interface IDs NS_EXTERN_IID(kIBrowserWindowIID);