summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/PluginProcess
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebKit2/PluginProcess
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebKit2/PluginProcess')
-rw-r--r--Source/WebKit2/PluginProcess/PluginControllerProxy.cpp85
-rw-r--r--Source/WebKit2/PluginProcess/PluginControllerProxy.h11
-rw-r--r--Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in4
-rw-r--r--Source/WebKit2/PluginProcess/PluginProcess.cpp59
-rw-r--r--Source/WebKit2/PluginProcess/PluginProcess.h11
-rw-r--r--Source/WebKit2/PluginProcess/WebProcessConnection.cpp6
-rw-r--r--Source/WebKit2/PluginProcess/WebProcessConnection.h1
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm24
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm2
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm29
10 files changed, 118 insertions, 114 deletions
diff --git a/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp b/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
index 03a8aec..30223b8 100644
--- a/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
+++ b/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
@@ -65,12 +65,20 @@ PluginControllerProxy::PluginControllerProxy(WebProcessConnection* connection, u
#if PLATFORM(MAC)
, m_isComplexTextInputEnabled(false)
#endif
+ , m_windowNPObject(0)
+ , m_pluginElementNPObject(0)
{
}
PluginControllerProxy::~PluginControllerProxy()
{
ASSERT(!m_plugin);
+
+ if (m_windowNPObject)
+ releaseNPObject(m_windowNPObject);
+
+ if (m_pluginElementNPObject)
+ releaseNPObject(m_pluginElementNPObject);
}
bool PluginControllerProxy::initialize(const Plugin::Parameters& parameters)
@@ -210,28 +218,40 @@ void PluginControllerProxy::cancelManualStreamLoad()
NPObject* PluginControllerProxy::windowScriptNPObject()
{
- uint64_t windowScriptNPObjectID = 0;
+ if (!m_windowNPObject) {
+ uint64_t windowScriptNPObjectID = 0;
- if (!m_connection->connection()->sendSync(Messages::PluginProxy::GetWindowScriptNPObject(), Messages::PluginProxy::GetWindowScriptNPObject::Reply(windowScriptNPObjectID), m_pluginInstanceID))
- return 0;
+ if (!m_connection->connection()->sendSync(Messages::PluginProxy::GetWindowScriptNPObject(), Messages::PluginProxy::GetWindowScriptNPObject::Reply(windowScriptNPObjectID), m_pluginInstanceID))
+ return 0;
- if (!windowScriptNPObjectID)
- return 0;
+ if (!windowScriptNPObjectID)
+ return 0;
+
+ m_windowNPObject = m_connection->npRemoteObjectMap()->createNPObjectProxy(windowScriptNPObjectID, m_plugin.get());
+ ASSERT(m_windowNPObject);
+ }
- return m_connection->npRemoteObjectMap()->createNPObjectProxy(windowScriptNPObjectID, m_plugin.get());
+ retainNPObject(m_windowNPObject);
+ return m_windowNPObject;
}
NPObject* PluginControllerProxy::pluginElementNPObject()
{
- uint64_t pluginElementNPObjectID = 0;
+ if (!m_pluginElementNPObject) {
+ uint64_t pluginElementNPObjectID = 0;
- if (!m_connection->connection()->sendSync(Messages::PluginProxy::GetPluginElementNPObject(), Messages::PluginProxy::GetPluginElementNPObject::Reply(pluginElementNPObjectID), m_pluginInstanceID))
- return 0;
+ if (!m_connection->connection()->sendSync(Messages::PluginProxy::GetPluginElementNPObject(), Messages::PluginProxy::GetPluginElementNPObject::Reply(pluginElementNPObjectID), m_pluginInstanceID))
+ return 0;
- if (!pluginElementNPObjectID)
- return 0;
+ if (!pluginElementNPObjectID)
+ return 0;
- return m_connection->npRemoteObjectMap()->createNPObjectProxy(pluginElementNPObjectID, m_plugin.get());
+ m_pluginElementNPObject = m_connection->npRemoteObjectMap()->createNPObjectProxy(pluginElementNPObjectID, m_plugin.get());
+ ASSERT(m_pluginElementNPObject);
+ }
+
+ retainNPObject(m_pluginElementNPObject);
+ return m_pluginElementNPObject;
}
bool PluginControllerProxy::evaluate(NPObject* npObject, const String& scriptString, NPVariant* result, bool allowPopups)
@@ -273,6 +293,7 @@ void PluginControllerProxy::pluginProcessCrashed()
ASSERT_NOT_REACHED();
}
+#if PLATFORM(MAC)
void PluginControllerProxy::setComplexTextInputEnabled(bool complexTextInputEnabled)
{
if (m_isComplexTextInputEnabled == complexTextInputEnabled)
@@ -287,6 +308,7 @@ mach_port_t PluginControllerProxy::compositingRenderServerPort()
{
return PluginProcess::shared().compositingRenderServerPort();
}
+#endif
String PluginControllerProxy::proxiesForURL(const String& urlString)
{
@@ -347,14 +369,14 @@ void PluginControllerProxy::geometryDidChange(const IntRect& frameRect, const In
ASSERT(m_plugin);
+ platformGeometryDidChange();
+
if (!backingStoreHandle.isNull()) {
// Create a new backing store.
m_backingStore = ShareableBitmap::create(backingStoreHandle);
}
m_plugin->geometryDidChange(frameRect, clipRect);
-
- platformGeometryDidChange(frameRect, clipRect);
}
void PluginControllerProxy::didEvaluateJavaScript(uint64_t requestID, const String& requestURLString, const String& result)
@@ -414,9 +436,17 @@ void PluginControllerProxy::manualStreamDidFail(bool wasCancelled)
m_plugin->manualStreamDidFail(wasCancelled);
}
-void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent, bool& handled)
+void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply> reply)
{
- handled = m_plugin->handleMouseEvent(mouseEvent);
+ // Always let the web process think that we've handled this mouse event, even before passing it along to the plug-in.
+ // This is a workaround for
+ // <rdar://problem/9299901> UI process thinks the page is unresponsive when a plug-in is showing a context menu.
+ // The web process sends a synchronous HandleMouseEvent message and the plug-in process spawns a nested
+ // run loop when showing the context menu, so eventually the unresponsiveness timer kicks in in the UI process.
+ // FIXME: We should come up with a better way to do this.
+ reply->send(true);
+
+ m_plugin->handleMouseEvent(mouseEvent);
}
void PluginControllerProxy::handleWheelEvent(const WebWheelEvent& wheelEvent, bool& handled)
@@ -481,29 +511,6 @@ void PluginControllerProxy::getPluginScriptableNPObject(uint64_t& pluginScriptab
releaseNPObject(pluginScriptableNPObject);
}
-#if PLATFORM(MAC)
-void PluginControllerProxy::windowFocusChanged(bool hasFocus)
-{
- m_plugin->windowFocusChanged(hasFocus);
-}
-
-void PluginControllerProxy::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates)
-{
- m_plugin->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates);
-}
-
-void PluginControllerProxy::windowVisibilityChanged(bool isVisible)
-{
- m_plugin->windowVisibilityChanged(isVisible);
-}
-
-void PluginControllerProxy::sendComplexTextInput(const String& textInput)
-{
- m_plugin->sendComplexTextInput(textInput);
-}
-
-#endif
-
void PluginControllerProxy::privateBrowsingStateChanged(bool isPrivateBrowsingEnabled)
{
m_plugin->privateBrowsingStateChanged(isPrivateBrowsingEnabled);
diff --git a/Source/WebKit2/PluginProcess/PluginControllerProxy.h b/Source/WebKit2/PluginProcess/PluginControllerProxy.h
index 65be39e..a6207df 100644
--- a/Source/WebKit2/PluginProcess/PluginControllerProxy.h
+++ b/Source/WebKit2/PluginProcess/PluginControllerProxy.h
@@ -31,6 +31,7 @@
#include "Connection.h"
#include "Plugin.h"
#include "PluginController.h"
+#include "PluginControllerProxyMessages.h"
#include "RunLoop.h"
#include "ShareableBitmap.h"
#include <wtf/Noncopyable.h>
@@ -115,7 +116,7 @@ private:
void manualStreamDidReceiveData(const CoreIPC::DataReference& data);
void manualStreamDidFinishLoading();
void manualStreamDidFail(bool wasCancelled);
- void handleMouseEvent(const WebMouseEvent&, bool& handled);
+ void handleMouseEvent(const WebMouseEvent&, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply>);
void handleWheelEvent(const WebWheelEvent&, bool& handled);
void handleMouseEnterEvent(const WebMouseEvent&, bool& handled);
void handleMouseLeaveEvent(const WebMouseEvent&, bool& handled);
@@ -137,7 +138,7 @@ private:
void platformInitialize();
void platformDestroy();
- void platformGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect);
+ void platformGeometryDidChange();
WebProcessConnection* m_connection;
uint64_t m_pluginInstanceID;
@@ -182,6 +183,12 @@ private:
// The backing store that this plug-in draws into.
RefPtr<ShareableBitmap> m_backingStore;
+
+ // The window NPObject.
+ NPObject* m_windowNPObject;
+
+ // The plug-in element NPObject.
+ NPObject* m_pluginElementNPObject;
};
} // namespace WebKit
diff --git a/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in b/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
index 6e27b36..349172d 100644
--- a/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
+++ b/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
@@ -60,7 +60,7 @@ messages -> PluginControllerProxy {
ManualStreamDidFail(bool wasCancelled)
# Sent when a mouse event (that isn't a mouse enter/leave event or a wheel event) should be processed.
- HandleMouseEvent(WebKit::WebMouseEvent mouseEvent) -> (bool handled)
+ HandleMouseEvent(WebKit::WebMouseEvent mouseEvent) -> (bool handled) Delayed
# Sent when a mouse wheel event should be processed.
HandleWheelEvent(WebKit::WebWheelEvent wheelEvent) -> (bool handled)
@@ -86,10 +86,10 @@ messages -> PluginControllerProxy {
# Get a reference to the plug-in's scriptable NPObject.
GetPluginScriptableNPObject() -> (uint64_t pluginScriptableNPObjectID)
+#if PLATFORM(MAC)
# Send the complex text input to the plug-in.
SendComplexTextInput(WTF::String textInput)
-#if PLATFORM(MAC)
# Sent when the containing NSWindow's focus changes
WindowFocusChanged(bool hasFocus)
diff --git a/Source/WebKit2/PluginProcess/PluginProcess.cpp b/Source/WebKit2/PluginProcess/PluginProcess.cpp
index e35de9d..30504a2 100644
--- a/Source/WebKit2/PluginProcess/PluginProcess.cpp
+++ b/Source/WebKit2/PluginProcess/PluginProcess.cpp
@@ -29,12 +29,15 @@
#if ENABLE(PLUGIN_PROCESS)
#include "ArgumentCoders.h"
-#include "MachPort.h"
#include "NetscapePluginModule.h"
#include "PluginProcessProxyMessages.h"
#include "PluginProcessCreationParameters.h"
#include "WebProcessConnection.h"
+#if PLATFORM(MAC)
+#include "MachPort.h"
+#endif
+
namespace WebKit {
static const double shutdownTimeout = 15.0;
@@ -46,8 +49,8 @@ PluginProcess& PluginProcess::shared()
}
PluginProcess::PluginProcess()
- : m_shutdownTimer(RunLoop::main(), this, &PluginProcess::shutdownTimerFired)
-#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
+ : ChildProcess(shutdownTimeout)
+#if PLATFORM(MAC)
, m_compositingRenderServerPort(MACH_PORT_NULL)
#endif
{
@@ -78,7 +81,7 @@ void PluginProcess::removeWebProcessConnection(WebProcessConnection* webProcessC
m_pluginModule->decrementLoadCount();
}
- startShutdownTimerIfNecessary();
+ enableTermination();
}
NetscapePluginModule* PluginProcess::netscapePluginModule()
@@ -98,6 +101,13 @@ NetscapePluginModule* PluginProcess::netscapePluginModule()
return m_pluginModule.get();
}
+bool PluginProcess::shouldTerminate()
+{
+ ASSERT(m_webProcessConnections.isEmpty());
+
+ return true;
+}
+
void PluginProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
didReceivePluginProcessMessage(connection, messageID, arguments);
@@ -114,13 +124,10 @@ void PluginProcess::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::Mess
{
}
-NO_RETURN void PluginProcess::didFailToSendSyncMessage(CoreIPC::Connection*)
+void PluginProcess::syncMessageSendTimedOut(CoreIPC::Connection*)
{
- // We were making a synchronous call to a web process that doesn't exist any more.
- // Callers are unlikely to be prepared for an error like this, so it's best to exit immediately.
- exit(0);
}
-
+
void PluginProcess::initializePluginProcess(const PluginProcessCreationParameters& parameters)
{
ASSERT(!m_pluginModule);
@@ -132,20 +139,23 @@ void PluginProcess::initializePluginProcess(const PluginProcessCreationParameter
void PluginProcess::createWebProcessConnection()
{
- // FIXME: This is platform specific!
+ bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty();
+#if PLATFORM(MAC)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
- bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty();
-
// Create a listening connection.
RefPtr<WebProcessConnection> connection = WebProcessConnection::create(listeningPort);
m_webProcessConnections.append(connection.release());
CoreIPC::MachPort clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
m_connection->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientPort), 0);
+#else
+ // FIXME: Implement.
+ ASSERT_NOT_REACHED();
+#endif
if (NetscapePluginModule* module = netscapePluginModule()) {
if (!didHaveAnyWebProcessConnections) {
@@ -155,23 +165,24 @@ void PluginProcess::createWebProcessConnection()
}
}
- // Stop the shutdown timer.
- m_shutdownTimer.stop();
+ disableTermination();
}
void PluginProcess::getSitesWithData(uint64_t callbackID)
{
+ LocalTerminationDisabler terminationDisabler(*this);
+
Vector<String> sites;
if (NetscapePluginModule* module = netscapePluginModule())
sites = module->sitesWithData();
m_connection->send(Messages::PluginProcessProxy::DidGetSitesWithData(sites, callbackID), 0);
-
- startShutdownTimerIfNecessary();
}
void PluginProcess::clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
{
+ LocalTerminationDisabler terminationDisabler(*this);
+
if (NetscapePluginModule* module = netscapePluginModule()) {
if (sites.isEmpty()) {
// Clear everything.
@@ -183,22 +194,6 @@ void PluginProcess::clearSiteData(const Vector<String>& sites, uint64_t flags, u
}
m_connection->send(Messages::PluginProcessProxy::DidClearSiteData(callbackID), 0);
-
- startShutdownTimerIfNecessary();
-}
-
-void PluginProcess::startShutdownTimerIfNecessary()
-{
- if (!m_webProcessConnections.isEmpty())
- return;
-
- // Start the shutdown timer.
- m_shutdownTimer.startOneShot(shutdownTimeout);
-}
-
-void PluginProcess::shutdownTimerFired()
-{
- RunLoop::current()->stop();
}
} // namespace WebKit
diff --git a/Source/WebKit2/PluginProcess/PluginProcess.h b/Source/WebKit2/PluginProcess/PluginProcess.h
index 83c3b30..a610326 100644
--- a/Source/WebKit2/PluginProcess/PluginProcess.h
+++ b/Source/WebKit2/PluginProcess/PluginProcess.h
@@ -64,11 +64,14 @@ private:
PluginProcess();
~PluginProcess();
+ // ChildProcess
+ virtual bool shouldTerminate();
+
// CoreIPC::Connection::Client
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
virtual void didClose(CoreIPC::Connection*);
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
- virtual void didFailToSendSyncMessage(CoreIPC::Connection*);
+ virtual void syncMessageSendTimedOut(CoreIPC::Connection*);
// Message handlers.
void didReceivePluginProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
@@ -77,9 +80,6 @@ private:
void getSitesWithData(uint64_t callbackID);
void clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
- void startShutdownTimerIfNecessary();
- void shutdownTimerFired();
-
void platformInitialize(const PluginProcessCreationParameters&);
// The connection to the UI process.
@@ -94,9 +94,6 @@ private:
// The plug-in module.
RefPtr<NetscapePluginModule> m_pluginModule;
- // A timer used for the shutdown timeout.
- RunLoop::Timer<PluginProcess> m_shutdownTimer;
-
#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
// The Mach port used for accelerated compositing.
mach_port_t m_compositingRenderServerPort;
diff --git a/Source/WebKit2/PluginProcess/WebProcessConnection.cpp b/Source/WebKit2/PluginProcess/WebProcessConnection.cpp
index 56ffbb9..24e2027 100644
--- a/Source/WebKit2/PluginProcess/WebProcessConnection.cpp
+++ b/Source/WebKit2/PluginProcess/WebProcessConnection.cpp
@@ -157,6 +157,10 @@ void WebProcessConnection::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIP
// FIXME: Implement.
}
+void WebProcessConnection::syncMessageSendTimedOut(CoreIPC::Connection*)
+{
+}
+
void WebProcessConnection::createPlugin(uint64_t pluginInstanceID, const Plugin::Parameters& parameters, const String& userAgent, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled, bool& result, uint32_t& remoteLayerClientID)
{
OwnPtr<PluginControllerProxy> pluginControllerProxy = PluginControllerProxy::create(this, pluginInstanceID, userAgent, isPrivateBrowsingEnabled, isAcceleratedCompositingEnabled);
@@ -173,7 +177,9 @@ void WebProcessConnection::createPlugin(uint64_t pluginInstanceID, const Plugin:
if (!result)
return;
+#if PLATFORM(MAC)
remoteLayerClientID = pluginControllerProxyPtr->remoteLayerClientID();
+#endif
}
} // namespace WebKit
diff --git a/Source/WebKit2/PluginProcess/WebProcessConnection.h b/Source/WebKit2/PluginProcess/WebProcessConnection.h
index 83fe0fe..57ad82b 100644
--- a/Source/WebKit2/PluginProcess/WebProcessConnection.h
+++ b/Source/WebKit2/PluginProcess/WebProcessConnection.h
@@ -61,6 +61,7 @@ private:
virtual CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
virtual void didClose(CoreIPC::Connection*);
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
+ virtual void syncMessageSendTimedOut(CoreIPC::Connection*);
// Message handlers.
CoreIPC::SyncReplyMode didReceiveSyncWebProcessConnectionMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
diff --git a/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm b/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
index 610ca32..347d026 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
@@ -67,17 +67,37 @@ uint32_t PluginControllerProxy::remoteLayerClientID() const
return WKCARemoteLayerClientGetClientId(m_remoteLayerClient.get());
}
-void PluginControllerProxy::platformGeometryDidChange(const IntRect& frameRect, const IntRect&)
+void PluginControllerProxy::platformGeometryDidChange()
{
CALayer * pluginLayer = m_plugin->pluginLayer();
// We don't want to animate to the new size so we disable actions for this transaction.
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
- [pluginLayer setFrame:CGRectMake(0, 0, frameRect.width(), frameRect.height())];
+ [pluginLayer setFrame:CGRectMake(0, 0, m_frameRect.width(), m_frameRect.height())];
[CATransaction commit];
}
+void PluginControllerProxy::windowFocusChanged(bool hasFocus)
+{
+ m_plugin->windowFocusChanged(hasFocus);
+}
+
+void PluginControllerProxy::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates)
+{
+ m_plugin->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates);
+}
+
+void PluginControllerProxy::windowVisibilityChanged(bool isVisible)
+{
+ m_plugin->windowVisibilityChanged(isVisible);
+}
+
+void PluginControllerProxy::sendComplexTextInput(const String& textInput)
+{
+ m_plugin->sendComplexTextInput(textInput);
+}
+
} // namespace WebKit
#endif // ENABLE(PLUGIN_PROCESS)
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
index 3a3586a..d509d49 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
@@ -219,7 +219,7 @@ void PluginProcess::platformInitialize(const PluginProcessCreationParameters& pa
{
m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port();
- NSString *applicationName = [NSString stringWithFormat:UI_STRING("%@ (%@ Internet plug-in)",
+ NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ (%@ Internet plug-in)",
"visible name of the plug-in host process. The first argument is the plug-in name "
"and the second argument is the application name."),
[[(NSString *)parameters.pluginPath lastPathComponent] stringByDeletingPathExtension],
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
index 6a32727..d01a24f 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
@@ -121,32 +121,6 @@ static void shimHideWindow(WindowRef window)
HideWindow(window);
}
-static bool isMenuBarVisible = true;
-
-static void shimShowMenuBar(void)
-{
- isMenuBarVisible = true;
-
- ShowMenuBar();
-}
-
-static void shimHideMenuBar(void)
-{
- isMenuBarVisible = false;
-
- // Make sure to make ourselves the front process
- ProcessSerialNumber psn;
- GetCurrentProcess(&psn);
- SetFrontProcess(&psn);
-
- HideMenuBar();
-}
-
-static Boolean shimIsMenuBarVisible(void)
-{
- return isMenuBarVisible;
-}
-
DYLD_INTERPOSE(shimDebugger, Debugger);
DYLD_INTERPOSE(shimGetCurrentEventButtonState, GetCurrentEventButtonState);
DYLD_INTERPOSE(shimIsWindowActive, IsWindowActive);
@@ -154,9 +128,6 @@ DYLD_INTERPOSE(shimModalDialog, ModalDialog);
DYLD_INTERPOSE(shimAlert, Alert);
DYLD_INTERPOSE(shimShowWindow, ShowWindow);
DYLD_INTERPOSE(shimHideWindow, HideWindow);
-DYLD_INTERPOSE(shimShowMenuBar, ShowMenuBar)
-DYLD_INTERPOSE(shimHideMenuBar, HideMenuBar)
-DYLD_INTERPOSE(shimIsMenuBarVisible, IsMenuBarVisible);
#endif