Making plugins work on Windows CE. There many crashes do to subclassing. This addresses those problem by not subclassing. This is WinCE only. r/sr=jst. a=asa. Relanding

This commit is contained in:
dougt%meer.net 2005-07-13 19:08:20 +00:00
Родитель f83ecb998c
Коммит b94fc67083
2 изменённых файлов: 15 добавлений и 0 удалений

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

@ -2545,6 +2545,10 @@ nsPluginHostImpl::nsPluginHostImpl()
mPrefService->GetBoolPref("plugin.default_plugin_disabled", &tmp);
mDefaultPluginDisabled = tmp;
#ifdef WINCE
mDefaultPluginDisabled = PR_TRUE;
#endif
}
nsCOMPtr<nsIObserverService> obsService = do_GetService("@mozilla.org/observer-service;1");

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

@ -129,8 +129,10 @@ public:
virtual nsresult CallSetWindow(nsCOMPtr<nsIPluginInstance> &aPluginInstance);
private:
#ifndef WINCE
nsresult SubclassAndAssociateWindow();
nsresult UndoSubclassAndAssociateWindow();
#endif
public:
// locals
@ -474,17 +476,25 @@ nsresult nsPluginNativeWindowWin::CallSetWindow(nsCOMPtr<nsIPluginInstance> &aPl
{
// check the incoming instance, null indicates that window is going away and we are
// not interested in subclassing business any more, undo and don't subclass
// WINCE does not subclass windows. See bug 300011 for the details.
#ifndef WINCE
if (!aPluginInstance)
UndoSubclassAndAssociateWindow();
#endif
nsPluginNativeWindow::CallSetWindow(aPluginInstance);
#ifndef WINCE
if (aPluginInstance)
SubclassAndAssociateWindow();
#endif
return NS_OK;
}
#ifndef WINCE
nsresult nsPluginNativeWindowWin::SubclassAndAssociateWindow()
{
if (type != nsPluginWindowType_Window)
@ -532,6 +542,7 @@ nsresult nsPluginNativeWindowWin::UndoSubclassAndAssociateWindow()
return NS_OK;
}
#endif // WINCE
nsresult PLUG_NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow)
{