Add a shim for IsWindowActive
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2010 20:34:47 +0000 (20:34 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Dec 2010 20:34:47 +0000 (20:34 +0000)
commita1eaa4979ee656963b8e6a7a8cd54302b07c9817
tree5a9c663f7a73cdc18bdf7d84aa3648c575ec2c3c
parent28609765a75d58111cd24acc1c6bb236c49ab396
Add a shim for IsWindowActive
https://bugs.webkit.org/show_bug.cgi?id=50582

Reviewed by Adam Roben.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::isWindowActive):
Get the NetscapePlugin from the WindowRef and check if the plug-in's window is active.

(WebKit::PluginProcess::initializeShim):
* PluginProcess/mac/PluginProcessShim.cpp
(WebKit::shimIsWindowActive):
Call isWindowActive. If it returns true, return the result value. Otherwise, call the real
IsWindowActive function.

* PluginProcess/mac/PluginProcessShim.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_isWindowactive.

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(WebKit::NetscapePlugin::isWindowActive):
Return whether the window is active.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::windowMap):
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::netscapePluginFromWindow):
Add a mapping between windows and the corresponding NetscapePlugin objects.

(WebKit::NetscapePlugin::windowFocusChanged):
Update the window focus member variable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/PluginProcess/mac/PluginProcessMac.mm
WebKit2/PluginProcess/mac/PluginProcessShim.cpp
WebKit2/PluginProcess/mac/PluginProcessShim.h
WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm