Bug 461849 - enable icon decoder on Windows Mobile. r=stuart

This commit is contained in:
Doug Turner 2009-02-19 18:56:49 -08:00
Родитель dbc6087b46
Коммит c660b6e351
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -259,6 +259,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
return rv;
}
#ifndef WINCE
static DWORD GetSpecialFolderIcon(nsIFile* aFile, int aFolder, SHFILEINFOW* aSFI, UINT aInfoFlags)
{
DWORD shellResult = 0;
@ -292,11 +293,13 @@ static DWORD GetSpecialFolderIcon(nsIFile* aFile, int aFolder, SHFILEINFOW* aSFI
}
return shellResult;
}
#endif
static UINT GetSizeInfoFlag(PRUint32 aDesiredImageSize)
{
UINT infoFlag;
#ifndef WINCE
// SHGFI_SHELLICONSIZE does not exist on windows mobile.
if (aDesiredImageSize > 16)
infoFlag = SHGFI_SHELLICONSIZE;
else
@ -308,6 +311,10 @@ static UINT GetSizeInfoFlag(PRUint32 aDesiredImageSize)
nsresult nsIconChannel::GetHIconFromFile(HICON *hIcon)
{
#ifdef WINCE
// GetDIBits does not exist on windows mobile.
return NS_ERROR_NOT_AVAILABLE;
#else
nsXPIDLCString contentType;
nsCString fileExt;
nsCOMPtr<nsIFile> localFile; // file we want an icon for
@ -383,6 +390,7 @@ nsresult nsIconChannel::GetHIconFromFile(HICON *hIcon)
rv = NS_ERROR_NOT_AVAILABLE;
return rv;
#endif
}
#ifndef MOZ_DISABLE_VISTA_SDK_REQUIREMENTS
@ -433,7 +441,10 @@ nsresult nsIconChannel::GetStockHIcon(nsIMozIconURI *aIconURI, HICON *hIcon)
nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBlocking)
{
// Check whether the icon requested's a file icon or a stock icon
nsresult rv;
nsresult rv = NS_ERROR_NOT_AVAILABLE;
// GetDIBits does not exist on windows mobile.
#ifndef WINCE
HICON hIcon = NULL;
#ifndef MOZ_DISABLE_VISTA_SDK_REQUIREMENTS
@ -522,6 +533,7 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc
DestroyIcon(hIcon);
} // if we got an hIcon
#endif
return rv;
}