Commit 53f88810 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-25 Anders Carlsson <andersca@apple.com>

        Reviewed by Sam Weinig.

        need a way to request the host CALayer render server port
        https://bugs.webkit.org/show_bug.cgi?id=53101
        <rdar://problem/8913620>

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::compositingRenderServerPort):
        Get the render server port from the plug-in process.

        * PluginProcess/PluginControllerProxy.h:
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue):
        Call NetscapePlugin::compositingRenderServerPort.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::compositingRenderServerPort):
        Call PluginController::compositingRenderServerPort.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::compositingRenderServerPort):
        Get the render server port from the web process.

        * WebProcess/Plugins/PluginView.h:
        Add compositingRenderServerPort.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d10d6685
2011-01-25 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
need a way to request the host CALayer render server port
https://bugs.webkit.org/show_bug.cgi?id=53101
<rdar://problem/8913620>
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::compositingRenderServerPort):
Get the render server port from the plug-in process.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Call NetscapePlugin::compositingRenderServerPort.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
Call PluginController::compositingRenderServerPort.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::compositingRenderServerPort):
Get the render server port from the web process.
* WebProcess/Plugins/PluginView.h:
Add compositingRenderServerPort.
2011-01-25 Maciej Stachowiak <mjs@apple.com>
 
Rubber stamped by Dan Bernstein.
......@@ -249,6 +249,11 @@ void PluginControllerProxy::setComplexTextInputEnabled(bool complexTextInputEnab
m_connection->connection()->send(Messages::PluginProxy::SetComplexTextInputEnabled(complexTextInputEnabled), m_pluginInstanceID);
}
mach_port_t PluginControllerProxy::compositingRenderServerPort()
{
return PluginProcess::shared().compositingRenderServerPort();
}
String PluginControllerProxy::proxiesForURL(const String& urlString)
{
String proxyString;
......
......@@ -90,6 +90,7 @@ private:
#if PLATFORM(MAC)
virtual void setComplexTextInputEnabled(bool);
virtual mach_port_t compositingRenderServerPort();
#endif
virtual String proxiesForURL(const String&);
......
......@@ -387,8 +387,12 @@ static NPError NPN_PostURLNotify(NPP npp, const char* url, const char* target, u
}
#if PLATFORM(MAC)
/* TRUE if the browser supports hardware compositing of Core Animation plug-ins */
// true if the browser supports hardware compositing of Core Animation plug-ins.
static const unsigned WKNVSupportsCompositingCoreAnimationPluginsBool = 74656;
// The Core Animation render server port.
static const unsigned WKNVCALayerRenderServerPort = 71879;
#endif
static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value)
......@@ -432,6 +436,13 @@ static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value)
*(NPBool*)value = true;
break;
case WKNVCALayerRenderServerPort: {
RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp);
*(mach_port_t*)value = plugin->compositingRenderServerPort();
break;
}
#ifndef NP_NO_QUICKDRAW
case NPNVsupportsQuickDrawBool:
// We don't support the QuickDraw drawing model.
......
......@@ -56,6 +56,8 @@ public:
NPBool convertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double& destX, double& destY, NPCoordinateSpace destSpace);
NPError popUpContextMenu(NPMenu*);
mach_port_t compositingRenderServerPort();
#ifndef NP_NO_CARBON
WindowRef windowRef() const;
bool isWindowActive() const { return m_windowHasFocus; }
......
......@@ -171,6 +171,11 @@ NPError NetscapePlugin::popUpContextMenu(NPMenu* npMenu)
return NPERR_NO_ERROR;
}
mach_port_t NetscapePlugin::compositingRenderServerPort()
{
return m_pluginController->compositingRenderServerPort();
}
#ifndef NP_NO_CARBON
typedef HashMap<WindowRef, NetscapePlugin*> WindowMap;
......
......@@ -91,6 +91,9 @@ public:
#if PLATFORM(MAC)
// Tells the controller that complex text input be enabled or disabled for the plug-in.
virtual void setComplexTextInputEnabled(bool) = 0;
// Returns the mach port of the compositing render server.
virtual mach_port_t compositingRenderServerPort() = 0;
#endif
// Returns the proxies for the given URL or null on failure.
......
......@@ -30,6 +30,7 @@
#include "WebEvent.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
#include <WebCore/Chrome.h>
#include <WebCore/CookieJar.h>
#include <WebCore/DocumentLoader.h>
......@@ -959,6 +960,12 @@ void PluginView::setComplexTextInputEnabled(bool complexTextInputEnabled)
{
m_webPage->send(Messages::WebPageProxy::SetComplexTextInputEnabled(m_plugin->pluginComplexTextInputIdentifier(), complexTextInputEnabled));
}
mach_port_t PluginView::compositingRenderServerPort()
{
return WebProcess::shared().compositingRenderServerPort();
}
#endif
String PluginView::proxiesForURL(const String& urlString)
......
......@@ -132,6 +132,7 @@ private:
#endif
#if PLATFORM(MAC)
virtual void setComplexTextInputEnabled(bool);
virtual mach_port_t compositingRenderServerPort();
#endif
virtual String proxiesForURL(const String&);
virtual String cookiesForURL(const String&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment