Commit 172c3cb3 authored by jberlin@webkit.org's avatar jberlin@webkit.org

Remove WKPageGetPlugInInformation - it is not used anymore

https://bugs.webkit.org/show_bug.cgi?id=119047

Reviewed by Alexey Proskuryakov.

Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
and ref-churn issues introduced in r151043, and r151043, which added
WKPageGetPlugInInformation.

* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bbad71f1
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047
Reviewed by Alexey Proskuryakov.
Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
and ref-churn issues introduced in r151043, and r151043, which added
WKPageGetPlugInInformation.
* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
......
......@@ -46,15 +46,3 @@ bool WKPageIsURLKnownHSTSHost(WKPageRef page, WKURLRef url)
return webPageProxy->process()->context()->isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
}
static void callGetPlugInInformationBlockAndDispose(WKDictionaryRef resultValue, WKErrorRef error, void* context)
{
WKPageGetPlugInInformationBlock block = (WKPageGetPlugInInformationBlock)context;
block(resultValue, error);
Block_release(block);
}
void WKPageGetPlugInInformation(WKPageRef pageRef, pid_t plugInProcessID, WKPageGetPlugInInformationBlock block)
{
toImpl(pageRef)->getPlugInInformation(plugInProcessID, DictionaryCallback::create(Block_copy(block), callGetPlugInInformationBlockAndDispose));
}
......@@ -35,9 +35,6 @@ extern "C" {
WK_EXPORT pid_t WKPageGetProcessIdentifier(WKPageRef page);
WK_EXPORT bool WKPageIsURLKnownHSTSHost(WKPageRef page, WKURLRef url);
typedef void (^WKPageGetPlugInInformationBlock)(WKDictionaryRef, WKErrorRef);
WK_EXPORT void WKPageGetPlugInInformation(WKPageRef, pid_t plugInProcessID, WKPageGetPlugInInformationBlock);
#ifdef __cplusplus
}
#endif
......
......@@ -63,8 +63,6 @@ public:
#if PLATFORM(MAC)
void setProcessSuppressionEnabled(bool);
PluginProcessProxy* findPlugInProcessByID(pid_t plugInProcessID) const;
PluginProcessProxy* findPlugInProcessByToken(uint64_t plugInProcessToken) const;
#endif
private:
......
......@@ -39,24 +39,6 @@ void PluginProcessManager::setProcessSuppressionEnabled(bool processSuppressionE
m_pluginProcesses[i]->setProcessSuppressionEnabled(processSuppressionEnabled);
}
PluginProcessProxy* PluginProcessManager::findPlugInProcessByID(pid_t plugInProcessID) const
{
for (size_t i = 0; i < m_pluginProcesses.size(); ++i) {
if (m_pluginProcesses[i]->processIdentifier() == plugInProcessID)
return m_pluginProcesses[i].get();
}
return 0;
}
PluginProcessProxy* PluginProcessManager::findPlugInProcessByToken(uint64_t plugInProcessToken) const
{
for (size_t i = 0; i < m_pluginProcesses.size(); ++i) {
if (m_pluginProcesses[i]->pluginProcessToken() == plugInProcessToken)
return m_pluginProcesses[i].get();
}
return 0;
}
} // namespace WebKit
#endif // ENABLE(PLUGIN_PROCESS)
......@@ -616,9 +616,6 @@ void WebPageProxy::close()
#if PLATFORM(GTK)
invalidateCallbackMap(m_printFinishedCallbacks);
#endif
#if PLATFORM(MAC)
invalidateCallbackMap(m_plugInInformationCallbacks);
#endif
Vector<WebEditCommandProxy*> editCommandVector;
copyToVector(m_editCommandSet, editCommandVector);
......
......@@ -166,7 +166,6 @@ class WebGestureEvent;
class WebVibrationProxy;
#endif
typedef GenericCallback<WKDictionaryRef> DictionaryCallback;
typedef GenericCallback<WKStringRef, StringImpl*> StringCallback;
typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback;
......@@ -537,9 +536,6 @@ public:
void makeFirstResponder();
ColorSpaceData colorSpace();
void getPlugInInformation(pid_t plugInProcessID, PassRefPtr<DictionaryCallback>);
void containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID);
#endif
void pageScaleFactorDidChange(double);
......@@ -1103,9 +1099,6 @@ private:
#if PLATFORM(GTK)
HashMap<uint64_t, RefPtr<PrintFinishedCallback>> m_printFinishedCallbacks;
#endif
#if PLATFORM(MAC)
HashMap<uint64_t, RefPtr<DictionaryCallback>> m_plugInInformationCallbacks;
#endif
HashSet<WebEditCommandProxy*> m_editCommandSet;
......
......@@ -263,7 +263,6 @@ messages -> WebPageProxy {
# Plug-in complex text input support messages
PluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState)
ContainsPlugInCallback(bool containsPlugIn, uint64_t plugInProcessToken, uint64_t callbackID)
# Speech messages
GetIsSpeaking() -> (bool isSpeaking)
......
......@@ -35,9 +35,6 @@
#import "PluginComplexTextInputState.h"
#import "PageClient.h"
#import "PageClientImpl.h"
#import "PluginInformation.h"
#import "PluginProcessManager.h"
#import "PluginProcessProxy.h"
#import "StringUtilities.h"
#import "TextChecker.h"
#import "WebPageMessages.h"
......@@ -463,48 +460,6 @@ void WebPageProxy::setPluginComplexTextInputState(uint64_t pluginComplexTextInpu
m_pageClient->setPluginComplexTextInputState(pluginComplexTextInputIdentifier, static_cast<PluginComplexTextInputState>(pluginComplexTextInputState));
}
void WebPageProxy::getPlugInInformation(pid_t plugInProcessID, PassRefPtr<DictionaryCallback> prpCallback)
{
RefPtr<DictionaryCallback> callback = prpCallback;
if (!isValid()) {
callback->invalidate();
return;
}
PluginProcessProxy* plugInProcessProxy = PluginProcessManager::shared().findPlugInProcessByID(plugInProcessID);
if (!plugInProcessProxy) {
callback->performCallbackWithReturnValue(0);
return;
}
uint64_t callbackID = callback->callbackID();
m_plugInInformationCallbacks.set(callbackID, callback.release());
m_process->send(Messages::WebPage::ContainsPluginViewsWithPluginProcessToken(plugInProcessProxy->pluginProcessToken(), callbackID), m_pageID);
}
void WebPageProxy::containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID)
{
RefPtr<DictionaryCallback> callback = m_plugInInformationCallbacks.take(callbackID);
if (!callback) {
// FIXME: Log error or assert.
return;
}
if (!containsPlugIn) {
callback->performCallbackWithReturnValue(0);
return;
}
PluginProcessProxy* plugInProcessProxy = PluginProcessManager::shared().findPlugInProcessByToken(plugInToken);
ASSERT(plugInProcessProxy);
ImmutableDictionary::MapType map;
getPluginModuleInformation(plugInProcessProxy->pluginProcessAttributes().moduleInfo, map);
RefPtr<ImmutableDictionary> plugInInformation = ImmutableDictionary::adopt(map);
callback->performCallbackWithReturnValue(plugInInformation.get());
}
void WebPageProxy::executeSavedCommandBySelector(const String& selector, bool& handled)
{
MESSAGE_CHECK(isValidKeypressCommandName(selector));
......
......@@ -260,8 +260,6 @@ private:
virtual String getSelectionString() const OVERRIDE { return String(); }
virtual uint64_t plugInProcessToken() const OVERRIDE { return 0; }
void updateNPNPrivateMode();
#if PLUGIN_ARCHITECTURE(WIN)
......
......@@ -202,8 +202,6 @@ private:
virtual bool shouldAlwaysAutoStart() const OVERRIDE { return true; }
virtual uint64_t plugInProcessToken() const OVERRIDE { return 0; }
WebCore::IntSize m_size;
WebCore::KURL m_sourceURL;
......
......@@ -277,8 +277,6 @@ public:
virtual String getSelectionString() const = 0;
virtual uint64_t plugInProcessToken() const = 0;
protected:
Plugin();
......
......@@ -139,8 +139,6 @@ private:
virtual String getSelectionString() const OVERRIDE { return String(); }
virtual uint64_t plugInProcessToken() const OVERRIDE { return m_pluginProcessToken; }
float contentsScaleFactor();
bool needsBackingStore() const;
bool updateBackingStore();
......
......@@ -80,7 +80,6 @@ public:
#endif
WebCore::HTMLPlugInElement* pluginElement() const { return m_pluginElement.get(); }
Plugin* plugIn() const { return m_plugin.get(); }
const Plugin::Parameters& initialParameters() const { return m_parameters; }
// FIXME: Remove this; nobody should have to know about the plug-in view's renderer except the plug-in view itself.
......
......@@ -368,8 +368,6 @@ public:
void setBottomOverhangImage(PassRefPtr<WebImage>);
void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
void containsPluginViewsWithPluginProcessToken(uint64_t plugInProcessToken, uint64_t callbackID);
#endif // PLATFORM(MAC)
bool windowIsFocused() const;
......
......@@ -263,8 +263,6 @@ messages -> WebPage LegacyReceiver {
# Complex text input support for plug-ins.
SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
ContainsPluginViewsWithPluginProcessToken(uint64_t plugInProcessToken, uint64_t callbackID)
SetWindowIsVisible(bool windowIsVisible)
WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect windowFrameInUnflippedScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
ViewExposedRectChanged(WebCore::FloatRect exposedRect, bool clipsToExposedRect)
......
......@@ -972,17 +972,4 @@ void WebPage::drawPagesToPDFFromPDFDocument(CGContextRef context, PDFDocument *p
}
}
void WebPage::containsPluginViewsWithPluginProcessToken(uint64_t plugInProcessToken, uint64_t callbackID)
{
bool containsPlugIn = false;
for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it) {
if ((*it)->plugIn()->plugInProcessToken() == plugInProcessToken) {
containsPlugIn = true;
break;
}
}
send(Messages::WebPageProxy::ContainsPlugInCallback(containsPlugIn, plugInProcessToken, callbackID));
}
} // namespace WebKit
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