[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 13:48:39 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 26215958f0eb4f3ce1ff65068febaf817422f663
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 27 19:17:59 2010 +0000
Add PluginProxy class
https://bugs.webkit.org/show_bug.cgi?id=46586
Reviewed by Sam Weinig.
* WebKit2.xcodeproj/project.pbxproj:
Add files.
* WebProcess/Plugins/PluginProxy.cpp: Added.
* WebProcess/Plugins/PluginProxy.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Create a PluginProxy wrapper.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 29a6301..44275f6 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -283,6 +283,23 @@
Reviewed by Sam Weinig.
+ Add PluginProxy class
+ https://bugs.webkit.org/show_bug.cgi?id=46586
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add files.
+
+ * WebProcess/Plugins/PluginProxy.cpp: Added.
+ * WebProcess/Plugins/PluginProxy.h: Added.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::createPlugin):
+ Create a PluginProxy wrapper.
+
+2010-09-26 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
Make it possible to encode null SharedMemory::Handle objects
https://bugs.webkit.org/show_bug.cgi?id=46585
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 766a2d5..233a206 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -54,6 +54,8 @@
1A043D7A124FEFC100FFBFB5 /* BackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A043D78124FEFC100FFBFB5 /* BackingStore.h */; };
1A043D7B124FEFC100FFBFB5 /* BackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A043D79124FEFC100FFBFB5 /* BackingStore.cpp */; };
1A043D92124FF02B00FFBFB5 /* BackingStoreMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A043D90124FF02B00FFBFB5 /* BackingStoreMac.mm */; };
+ 1A043DC1124FF87500FFBFB5 /* PluginProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A043DBF124FF87500FFBFB5 /* PluginProxy.h */; };
+ 1A043DC2124FF87500FFBFB5 /* PluginProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A043DC0124FF87500FFBFB5 /* PluginProxy.cpp */; };
1A0EC603124A9F2C007EF4A5 /* PluginProcessManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC601124A9F2C007EF4A5 /* PluginProcessManager.h */; };
1A0EC604124A9F2C007EF4A5 /* PluginProcessManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0EC602124A9F2C007EF4A5 /* PluginProcessManager.cpp */; };
1A0EC6C0124BBD9B007EF4A5 /* PluginProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC6BE124BBD9B007EF4A5 /* PluginProcessMessages.h */; };
@@ -471,6 +473,8 @@
1A043D78124FEFC100FFBFB5 /* BackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackingStore.h; sourceTree = "<group>"; };
1A043D79124FEFC100FFBFB5 /* BackingStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackingStore.cpp; sourceTree = "<group>"; };
1A043D90124FF02B00FFBFB5 /* BackingStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackingStoreMac.mm; sourceTree = "<group>"; };
+ 1A043DBF124FF87500FFBFB5 /* PluginProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProxy.h; sourceTree = "<group>"; };
+ 1A043DC0124FF87500FFBFB5 /* PluginProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProxy.cpp; sourceTree = "<group>"; };
1A0EC601124A9F2C007EF4A5 /* PluginProcessManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessManager.h; sourceTree = "<group>"; };
1A0EC602124A9F2C007EF4A5 /* PluginProcessManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessManager.cpp; sourceTree = "<group>"; };
1A0EC6B1124BBD36007EF4A5 /* PluginProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PluginProcess.messages.in; sourceTree = "<group>"; };
@@ -1003,6 +1007,8 @@
1A0EC904124C0AB8007EF4A5 /* PluginProcessConnection.h */,
1A0EC90E124C0AF5007EF4A5 /* PluginProcessConnectionManager.cpp */,
1A0EC90D124C0AF5007EF4A5 /* PluginProcessConnectionManager.h */,
+ 1A043DC0124FF87500FFBFB5 /* PluginProxy.cpp */,
+ 1A043DBF124FF87500FFBFB5 /* PluginProxy.h */,
1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */,
1A6FB7AD11E64B6800DB1371 /* PluginView.h */,
);
@@ -1854,6 +1860,7 @@
BC40762B124FF0400068F20A /* WKURLResponseNS.h in Headers */,
1A043D7A124FEFC100FFBFB5 /* BackingStore.h in Headers */,
BC40783D1250FADD0068F20A /* WKEvent.h in Headers */,
+ 1A043DC1124FF87500FFBFB5 /* PluginProxy.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2138,6 +2145,7 @@
1A043CEB124FE38F00FFBFB5 /* PluginProcessMessageReceiver.cpp in Sources */,
1A043D7B124FEFC100FFBFB5 /* BackingStore.cpp in Sources */,
1A043D92124FF02B00FFBFB5 /* BackingStoreMac.mm in Sources */,
+ 1A043DC2124FF87500FFBFB5 /* PluginProxy.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/Plugins/PluginProxy.cpp b/WebKit2/WebProcess/Plugins/PluginProxy.cpp
new file mode 100644
index 0000000..c51eeec
--- /dev/null
+++ b/WebKit2/WebProcess/Plugins/PluginProxy.cpp
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if ENABLE(PLUGIN_PROCESS)
+
+#include "PluginProxy.h"
+
+#include "NotImplemented.h"
+#include "PluginProcessConnection.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<PluginProxy> PluginProxy::create(PassRefPtr<PluginProcessConnection> connection)
+{
+ return adoptRef(new PluginProxy(connection));
+}
+
+PluginProxy::PluginProxy(PassRefPtr<PluginProcessConnection> connection)
+ : m_connection(connection)
+{
+}
+
+PluginProxy::~PluginProxy()
+{
+}
+
+bool PluginProxy::initialize(PluginController*, const Parameters&)
+{
+ notImplemented();
+ return false;
+}
+
+void PluginProxy::destroy()
+{
+ notImplemented();
+}
+
+void PluginProxy::paint(GraphicsContext*, const IntRect& dirtyRect)
+{
+ notImplemented();
+}
+
+#if PLATFORM(MAC)
+PlatformLayer* PluginProxy::pluginLayer()
+{
+ notImplemented();
+ return 0;
+}
+#endif
+
+void PluginProxy::geometryDidChange(const IntRect& frameRect, const IntRect& clipRect)
+{
+ notImplemented();
+}
+
+void PluginProxy::frameDidFinishLoading(uint64_t requestID)
+{
+ notImplemented();
+}
+
+void PluginProxy::frameDidFail(uint64_t requestID, bool wasCancelled)
+{
+ notImplemented();
+}
+
+void PluginProxy::didEvaluateJavaScript(uint64_t requestID, const WTF::String& requestURLString, const WTF::String& result)
+{
+ notImplemented();
+}
+
+void PluginProxy::streamDidReceiveResponse(uint64_t streamID, const KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers)
+{
+ notImplemented();
+}
+
+void PluginProxy::streamDidReceiveData(uint64_t streamID, const char* bytes, int length)
+{
+ notImplemented();
+}
+
+void PluginProxy::streamDidFinishLoading(uint64_t streamID)
+{
+ notImplemented();
+}
+
+void PluginProxy::streamDidFail(uint64_t streamID, bool wasCancelled)
+{
+ notImplemented();
+}
+
+void PluginProxy::manualStreamDidReceiveResponse(const KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers)
+{
+ notImplemented();
+}
+
+void PluginProxy::manualStreamDidReceiveData(const char* bytes, int length)
+{
+ notImplemented();
+}
+
+void PluginProxy::manualStreamDidFinishLoading()
+{
+ notImplemented();
+}
+
+void PluginProxy::manualStreamDidFail(bool wasCancelled)
+{
+ notImplemented();
+}
+
+bool PluginProxy::handleMouseEvent(const WebMouseEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+bool PluginProxy::handleWheelEvent(const WebWheelEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+bool PluginProxy::handleMouseEnterEvent(const WebMouseEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+bool PluginProxy::handleMouseLeaveEvent(const WebMouseEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+void PluginProxy::setFocus(bool)
+{
+ notImplemented();
+}
+
+NPObject* PluginProxy::pluginScriptableNPObject()
+{
+ notImplemented();
+ return 0;
+}
+
+#if PLATFORM(MAC)
+void PluginProxy::windowFocusChanged(bool)
+{
+ notImplemented();
+}
+
+void PluginProxy::windowFrameChanged(const IntRect&)
+{
+ notImplemented();
+}
+
+void PluginProxy::windowVisibilityChanged(bool)
+{
+ notImplemented();
+}
+
+#endif
+
+PluginController* PluginProxy::controller()
+{
+ return 0;
+}
+
+void PluginProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
+{
+ notImplemented();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(PLUGIN_PROCESS)
diff --git a/WebKit2/WebProcess/Plugins/PluginProxy.h b/WebKit2/WebProcess/Plugins/PluginProxy.h
new file mode 100644
index 0000000..87c4c8e
--- /dev/null
+++ b/WebKit2/WebProcess/Plugins/PluginProxy.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PluginProxy_h
+#define PluginProxy_h
+
+#if ENABLE(PLUGIN_PROCESS)
+
+#include "Connection.h"
+#include "Plugin.h"
+
+namespace WebKit {
+
+class PluginProcessConnection;
+
+class PluginProxy : public Plugin, public CoreIPC::Connection::MessageReceiver {
+public:
+ static PassRefPtr<PluginProxy> create(PassRefPtr<PluginProcessConnection>);
+ ~PluginProxy();
+
+private:
+ explicit PluginProxy(PassRefPtr<PluginProcessConnection>);
+
+ // Plugin
+ virtual bool initialize(PluginController*, const Parameters&);
+ virtual void destroy();
+ virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
+#if PLATFORM(MAC)
+ virtual PlatformLayer* pluginLayer();
+#endif
+ virtual void geometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect);
+ virtual void frameDidFinishLoading(uint64_t requestID);
+ virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
+ virtual void didEvaluateJavaScript(uint64_t requestID, const WTF::String& requestURLString, const WTF::String& result);
+ virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers);
+ virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
+ virtual void streamDidFinishLoading(uint64_t streamID);
+ virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
+ virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers);
+ virtual void manualStreamDidReceiveData(const char* bytes, int length);
+ virtual void manualStreamDidFinishLoading();
+ virtual void manualStreamDidFail(bool wasCancelled);
+
+ virtual bool handleMouseEvent(const WebMouseEvent&);
+ virtual bool handleWheelEvent(const WebWheelEvent&);
+ virtual bool handleMouseEnterEvent(const WebMouseEvent&);
+ virtual bool handleMouseLeaveEvent(const WebMouseEvent&);
+ virtual void setFocus(bool);
+ virtual NPObject* pluginScriptableNPObject();
+#if PLATFORM(MAC)
+ virtual void windowFocusChanged(bool);
+ virtual void windowFrameChanged(const WebCore::IntRect&);
+ virtual void windowVisibilityChanged(bool);
+#endif
+
+ virtual PluginController* controller();
+
+ // CoreIPC::Connection::MessageReceiver
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+
+ PassRefPtr<PluginProcessConnection> m_connection;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(PLUGIN_PROCESS)
+
+#endif // PluginProxy_h
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 8f7158b..4cc0935 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -30,7 +30,9 @@
#include "InjectedBundle.h"
#include "MessageID.h"
#include "NetscapePlugin.h"
+#include "PluginProcessConnection.h"
#include "PluginProcessConnectionManager.h"
+#include "PluginProxy.h"
#include "PluginView.h"
#include "WebBackForwardControllerClient.h"
#include "WebBackForwardListProxy.h"
@@ -198,8 +200,7 @@ PassRefPtr<Plugin> WebPage::createPlugin(const Plugin::Parameters& parameters)
if (!pluginProcessConnection)
return 0;
- // FIXME: Create a wrapper plug-in.
- return 0;
+ return PluginProxy::create(pluginProcessConnection);
#else
RefPtr<NetscapePluginModule> pluginModule = NetscapePluginModule::getOrCreate(pluginPath);
if (!pluginModule)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list