Bug 669200 - Disable PluginInstanceParent's subclass on the chrome plugin window since we cannot set subclasses on chrome windows in the content process. r=aklotz

This commit is contained in:
Jim Mathies 2014-11-12 14:59:22 -06:00
Родитель 03f61a003c
Коммит 99c075106e
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -1684,6 +1684,11 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd,
void
PluginInstanceParent::SubclassPluginWindow(HWND aWnd)
{
if (XRE_GetProcessType() == GeckoProcessType_Content) {
mPluginHWND = aWnd; // now a remote window, we can't subclass this
mPluginWndProc = nullptr;
return;
}
NS_ASSERTION(!(mPluginHWND && aWnd != mPluginHWND),
"PluginInstanceParent::SubclassPluginWindow hwnd is not our window!");
@ -1849,7 +1854,10 @@ PluginInstanceParent::AnswerPluginFocusChange(const bool& gotFocus)
// focus. We forward the event down to widget so the dom/focus manager can
// be updated.
#if defined(OS_WIN)
::SendMessage(mPluginHWND, gOOPPPluginFocusEvent, gotFocus ? 1 : 0, 0);
// XXX This needs to go to PuppetWidget. bug ???
if (XRE_GetProcessType() == GeckoProcessType_Default) {
::SendMessage(mPluginHWND, gOOPPPluginFocusEvent, gotFocus ? 1 : 0, 0);
}
return true;
#else
NS_NOTREACHED("PluginInstanceParent::AnswerPluginFocusChange not implemented!");