Bug 655176 - Remove WinCE code from docshell (incl broken uriloader/exthandler/Makefile.in WINNT |ifeq|s); r=bz
authorEd Morley <bmo@edmorley.co.uk>
Fri, 06 May 2011 11:41:29 -0700
changeset 69299 f20bf706d0b5617174462ce2aff31399a208149a
parent 69298 7c04a6a5ede665ae73571345e2aa626b52d9d846
child 69300 f65a3762c7deb29219d8ef99a0fbdea21fec663a
push idunknown
push userunknown
push dateunknown
reviewersbz
bugs655176
milestone6.0a1
Bug 655176 - Remove WinCE code from docshell (incl broken uriloader/exthandler/Makefile.in WINNT |ifeq|s); r=bz
docshell/build/Makefile.in
uriloader/exthandler/Makefile.in
uriloader/exthandler/win/nsMIMEInfoWin.cpp
--- a/docshell/build/Makefile.in
+++ b/docshell/build/Makefile.in
@@ -55,19 +55,16 @@ LIBXUL_LIBRARY	= 1
 
 EXPORTS = \
 		  nsDocShellCID.h \
 		  $(NULL)
 
 ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
 EXTRA_DSO_LIBS	= gkgfx
 endif
-ifeq ($(OS_ARCH),WINCE)
-EXTRA_DSO_LIBS	= gkgfx
-endif
 
 
 CPPSRCS		= \
 		nsDocShellModule.cpp		\
 		$(NULL)
 
 SHARED_LIBRARY_LIBS= \
 		../base/$(LIB_PREFIX)basedocshell_s.$(LIB_SUFFIX) \
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -175,22 +175,16 @@ LOCAL_INCLUDES   += $(MOZ_GIO_CFLAGS)
 EXTRA_DSO_LDOPTS += $(MOZ_GIO_LIBS)
 endif
 endif
 
 ifdef MOZ_ENABLE_CONTENTACTION
 CPPSRCS += nsContentHandlerApp.cpp
 endif
 
-ifeq ($(OS_ARCH),WINNT WINCE)
-OS_LIBS		+= shell32.lib
-GARBAGE		+= nsOSHelperAppService.cpp $(srcdir)/nsOSHelperAppService.cpp \
-             nsMIMEInfoWin.cpp $(srcdir)/nsMIMEInfoWin.cpp
-endif
-
 EXTRA_COMPONENTS = \
   nsHandlerService.js \
   nsHandlerService.manifest \
   nsWebHandlerApp.js \
   nsWebHandlerApp.manifest \
   $(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
@@ -198,14 +192,8 @@ FORCE_STATIC_LIB = 1
 SRCS_IN_OBJDIR	= 1
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(filter qt gtk2, $(MOZ_WIDGET_TOOLKIT)))
 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 endif
-
-# the use of multiple VPATH dirs is broken in cygwin make
-ifeq ($(OS_ARCH),WINNT WINCE)
-export:: $(OSDIR)/nsOSHelperAppService.cpp $(OSDIR)/nsMIMEInfoWin.cpp
-	$(INSTALL) $^ .
-endif
--- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
@@ -51,25 +51,16 @@
 #include "nsTArray.h"
 #include "shlobj.h"
 #include "windows.h"
 #include "nsIWindowsRegKey.h"
 #include "nsIProcess.h"
 #include "nsOSHelperAppService.h"
 #include "nsUnicharUtils.h"
 
-#ifdef WINCE 
-#ifdef UNICODE
-#define SHELLEXECUTEINFOW SHELLEXECUTEINFO
-#define ShellExecuteExW ShellExecuteEx
-#else
-#error "we don't support narrow char wince"
-#endif
-#endif
-
 #define RUNDLL32_EXE L"\\rundll32.exe"
 
 
 NS_IMPL_ISUPPORTS_INHERITED1(nsMIMEInfoWin, nsMIMEInfoBase, nsIPropertyBag)
 
 nsMIMEInfoWin::~nsMIMEInfoWin()
 {
 }
@@ -251,24 +242,22 @@ nsMIMEInfoWin::GetProperty(const nsAStri
 
     rv = GetIconURLVariant(executable, _retval);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
-#ifndef WINCE
 typedef HRESULT (STDMETHODCALLTYPE *MySHParseDisplayName)
                  (PCWSTR pszName,
                   IBindCtx *pbc,
                   LPITEMIDLIST *ppidl,
                   SFGAOF sfgaoIn,
                   SFGAOF *psfgaoOut);
-#endif
 
 // this implementation was pretty much copied verbatime from 
 // Tony Robinson's code in nsExternalProtocolWin.cpp
 nsresult
 nsMIMEInfoWin::LoadUriInternal(nsIURI * aURL)
 {
   nsresult rv = NS_OK;
 
@@ -293,27 +282,22 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * 
       return NS_ERROR_FAILURE;
 
     HMODULE hDll = NULL;
     
     static const PRUnichar cmdVerb[] = L"open";
     SHELLEXECUTEINFOW sinfo;
     memset(&sinfo, 0, sizeof(sinfo));
     sinfo.cbSize   = sizeof(sinfo);
-#ifdef WINCE
-    sinfo.fMask    = SEE_MASK_FLAG_NO_UI;
-#else
     sinfo.fMask    = SEE_MASK_FLAG_DDEWAIT |
       SEE_MASK_FLAG_NO_UI;
-#endif
     sinfo.hwnd     = NULL;
     sinfo.lpVerb   = (LPWSTR)&cmdVerb;
     sinfo.nShow    = SW_SHOWNORMAL;
     
-#ifndef WINCE
     LPITEMIDLIST pidl = NULL;
     SFGAOF sfgao;
     
     // Bug 394974
     hDll = ::LoadLibraryW(L"shell32.dll");
     MySHParseDisplayName pMySHParseDisplayName = NULL;
     // Version 6.0 and higher
     if (pMySHParseDisplayName = 
@@ -322,30 +306,26 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * 
                                           NULL, &pidl, 0, &sfgao))) {
         sinfo.lpIDList = pidl;
         sinfo.fMask |= SEE_MASK_INVOKEIDLIST;
       } else {
         // SHParseDisplayName exists, but failed. Bailing out as work around for
         // Microsoft Security Bulletin MS07-061
         rv = NS_ERROR_FAILURE;
       }
-    } else 
-#endif
-    {
+    } else {
       sinfo.lpFile =  NS_ConvertUTF8toUTF16(urlSpec).get();
     }
     if (NS_SUCCEEDED(rv)) {
       BOOL result = ShellExecuteExW(&sinfo);
       if (!result || ((LONG_PTR)sinfo.hInstApp) < 32)
         rv = NS_ERROR_FAILURE;
     }
-#ifndef WINCE
     if (pidl)
       CoTaskMemFree(pidl);
-#endif
     if (hDll) 
       ::FreeLibrary(hDll);
   }
   
   return rv;
 }
 
 // Given a path to a local file, return its nsILocalHandlerApp instance.