[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:44:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 359a94d6341d22172b227e0b01dd83b67dc1f4c3
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 17:03:15 2010 +0000

    Add PluginProcess class
    https://bugs.webkit.org/show_bug.cgi?id=46476
    
    Reviewed by Sam Weinig.
    
    * PluginProcess/PluginProcess.cpp: Added.
    * PluginProcess/PluginProcess.h: Added.
    Add stubbed out PluginProcess class.
    
    * PluginProcess/mac/PluginProcessMainMac.mm:
    (WebKit::PluginProcessMain):
    Initialize the plug-in process.
    
    * WebKit2.xcodeproj/project.pbxproj:
    Add files.
    
    * WebProcess/Plugins/PluginProcessConnection.h:
    Add a comment about which connection this is.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 93a60a3..54dea8b 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,24 @@
+2010-09-24  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add PluginProcess class
+        https://bugs.webkit.org/show_bug.cgi?id=46476
+
+        * PluginProcess/PluginProcess.cpp: Added.
+        * PluginProcess/PluginProcess.h: Added.
+        Add stubbed out PluginProcess class.
+
+        * PluginProcess/mac/PluginProcessMainMac.mm:
+        (WebKit::PluginProcessMain):
+        Initialize the plug-in process.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add files.
+
+        * WebProcess/Plugins/PluginProcessConnection.h:
+        Add a comment about which connection this is.
+
 2010-09-24  Sam Weinig  <sam at webkit.org>
 
         Fix windows build.
diff --git a/WebKit2/PluginProcess/PluginProcess.cpp b/WebKit2/PluginProcess/PluginProcess.cpp
new file mode 100644
index 0000000..c630de2
--- /dev/null
+++ b/WebKit2/PluginProcess/PluginProcess.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+#include "PluginProcess.h"
+
+#if ENABLE(PLUGIN_PROCESS)
+
+namespace WebKit {
+
+PluginProcess& PluginProcess::shared()
+{
+    DEFINE_STATIC_LOCAL(PluginProcess, pluginProcess, ());
+    return pluginProcess;
+}
+
+PluginProcess::PluginProcess()
+{
+}
+
+PluginProcess::~PluginProcess()
+{
+}
+
+void PluginProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier)
+{
+    ASSERT(!m_connection);
+
+    m_connection = CoreIPC::Connection::createClientConnection(serverIdentifier, this, RunLoop::main());
+    m_connection->open();
+}
+
+void PluginProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+{
+}
+
+void PluginProcess::didClose(CoreIPC::Connection*)
+{
+    // The UI process has crashed, just go ahead and quit.
+    // FIXME: If the plug-in is spinning in the main loop, we'll never get this message.
+    RunLoop::current()->stop();
+}
+
+void PluginProcess::didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(PLUGIN_PROCESS)
+
diff --git a/WebKit2/PluginProcess/PluginProcess.h b/WebKit2/PluginProcess/PluginProcess.h
new file mode 100644
index 0000000..60b3273
--- /dev/null
+++ b/WebKit2/PluginProcess/PluginProcess.h
@@ -0,0 +1,59 @@
+/*
+ * 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 PluginProcess_h
+#define PluginProcess_h
+
+#if ENABLE(PLUGIN_PROCESS)
+
+#include "Connection.h"
+#include "RunLoop.h"
+
+namespace WebKit {
+
+class PluginProcess : Noncopyable, CoreIPC::Connection::Client {
+public:
+    static PluginProcess& shared();
+
+    void initialize(CoreIPC::Connection::Identifier);
+
+private:
+    PluginProcess();
+    ~PluginProcess();
+
+    // CoreIPC::Connection::Client
+    virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+    virtual void didClose(CoreIPC::Connection*);
+    virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
+
+    // The connection to the UI process.
+    RefPtr<CoreIPC::Connection> m_connection;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(PLUGIN_PROCESS)
+
+#endif // PluginProcess_h
diff --git a/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm b/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
index bcb4000..772cd41 100644
--- a/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
+++ b/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
@@ -28,6 +28,7 @@
 #include "PluginProcessMain.h"
 
 #include "CommandLine.h"
+#include "PluginProcess.h"
 #include "RunLoop.h"
 #include <runtime/InitializeThreading.h>
 #include <servers/bootstrap.h>
@@ -70,7 +71,8 @@ int PluginProcessMain(const CommandLine& commandLine)
     WTF::initializeMainThread();
     RunLoop::initializeMainRunLoop();
 
-    // FIXME: Actually Initialize the plug-in host process.
+    // Initialize the plug-in host process.
+    PluginProcess::shared().initialize(serverPort);
 
     [NSApplication sharedApplication];
 
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 3537c63..68395fd 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -44,6 +44,8 @@
 		0F52667411DD4A490006D33C /* WebProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */; };
 		0FB659231208B4DB0044816C /* DrawingAreaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaBase.h */; };
 		0FB659A61208B9EE0044816C /* DrawingAreaBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */; };
+		1A043976124D034800FFBFB5 /* PluginProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A043974124D034800FFBFB5 /* PluginProcess.h */; };
+		1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A043975124D034800FFBFB5 /* PluginProcess.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 */; };
@@ -446,6 +448,8 @@
 		0FB659221208B4DB0044816C /* DrawingAreaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaBase.h; sourceTree = "<group>"; };
 		0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaBase.cpp; sourceTree = "<group>"; };
 		1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+		1A043974124D034800FFBFB5 /* PluginProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcess.h; sourceTree = "<group>"; };
+		1A043975124D034800FFBFB5 /* PluginProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcess.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>"; };
@@ -910,6 +914,8 @@
 			isa = PBXGroup;
 			children = (
 				1A0EC7FD124BD402007EF4A5 /* mac */,
+				1A043975124D034800FFBFB5 /* PluginProcess.cpp */,
+				1A043974124D034800FFBFB5 /* PluginProcess.h */,
 				1A0EC6B1124BBD36007EF4A5 /* PluginProcess.messages.in */,
 				1A0EC7FA124BD3B6007EF4A5 /* PluginProcessMain.h */,
 			);
@@ -1783,6 +1789,7 @@
 				1A0EC7FB124BD3B6007EF4A5 /* PluginProcessMain.h in Headers */,
 				1A0EC906124C0AB8007EF4A5 /* PluginProcessConnection.h in Headers */,
 				1A0EC90F124C0AF5007EF4A5 /* PluginProcessConnectionManager.h in Headers */,
+				1A043976124D034800FFBFB5 /* PluginProcess.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1832,6 +1839,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "WebKit2" */;
 			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
@@ -2058,6 +2066,7 @@
 				1A0EC803124BD41E007EF4A5 /* PluginProcessMainMac.mm in Sources */,
 				1A0EC907124C0AB8007EF4A5 /* PluginProcessConnection.cpp in Sources */,
 				1A0EC910124C0AF5007EF4A5 /* PluginProcessConnectionManager.cpp in Sources */,
+				1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/Plugins/PluginProcessConnection.h b/WebKit2/WebProcess/Plugins/PluginProcessConnection.h
index a9eb12b..0481632 100644
--- a/WebKit2/WebProcess/Plugins/PluginProcessConnection.h
+++ b/WebKit2/WebProcess/Plugins/PluginProcessConnection.h
@@ -64,6 +64,7 @@ private:
     PluginProcessConnectionManager* m_pluginProcessConnectionManager;
     String m_pluginPath;
 
+    // The connection from the web process to the plug-in process.
     RefPtr<CoreIPC::Connection> m_connection;
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list