Setup basic NetworkProcess messaging and initialization.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 23:37:30 +0000 (23:37 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 23:37:30 +0000 (23:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=99198

Reviewed by Sam Weinig.

Source/WebCore:

* English.lproj/Localizable.strings: Update for the Network Process UI name.

Source/WebKit2:

Project file/build system stuff:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:
* Scripts/webkit2/messages.py:
(struct_or_class):

Add basic initialization parameters for the NetworkProcess:
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit):
(WebKit::NetworkProcessCreationParameters::NetworkProcessCreationParameters):
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
(CoreIPC):
(WebKit):
(NetworkProcessCreationParameters):

Use them to message the NetworkProcess what it's application name should be:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
* UIProcess/Network/NetworkProcessProxy.h:
(WebKit):
(NetworkProcessProxy):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit):
(WebKit::NetworkProcessProxy::platformInitializeNetworkProcess):

Add basic message handling and initialization to the NetworkProcess itself:
* NetworkProcess/NetworkProcess.messages.in: Added.
* Platform/CoreIPC/MessageID.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveMessage):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit):
* NetworkProcess/NetworkProcess.h:
(WebKit):
(NetworkProcess):

Set a reasonable application name to be revealed in UI:
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit):
(WebKit::NetworkProcess::platformInitialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkProcess.messages.in [new file with mode: 0644]
Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm [new file with mode: 0644]
Source/WebKit2/Platform/CoreIPC/MessageID.h
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp [new file with mode: 0644]
Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h [new file with mode: 0644]
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 04ab7af..3097840 100644 (file)
@@ -1,3 +1,12 @@
+2012-10-12  Brady Eidson  <beidson@apple.com>
+
+        Setup basic NetworkProcess messaging and initialization.
+        https://bugs.webkit.org/show_bug.cgi?id=99198
+
+        Reviewed by Sam Weinig.
+
+        * English.lproj/Localizable.strings: Update for the Network Process UI name.
+
 2012-10-12  Levi Weintraub  <leviw@chromium.org>
 
         Remove unnecessary mode identifiers added in r131111
index 12c96b4..4c43150 100644 (file)
Binary files a/Source/WebCore/English.lproj/Localizable.strings and b/Source/WebCore/English.lproj/Localizable.strings differ
index 0a25c70..4c6c633 100644 (file)
@@ -1,3 +1,54 @@
+2012-10-12  Brady Eidson  <beidson@apple.com>
+
+        Setup basic NetworkProcess messaging and initialization.
+        https://bugs.webkit.org/show_bug.cgi?id=99198
+
+        Reviewed by Sam Weinig.
+
+        Project file/build system stuff:
+        * DerivedSources.make:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * Scripts/webkit2/messages.py:
+        (struct_or_class):
+
+        Add basic initialization parameters for the NetworkProcess:
+        * Shared/Network/NetworkProcessCreationParameters.cpp: 
+        (WebKit):
+        (WebKit::NetworkProcessCreationParameters::NetworkProcessCreationParameters):
+        (WebKit::NetworkProcessCreationParameters::encode):
+        (WebKit::NetworkProcessCreationParameters::decode):
+        * Shared/Network/NetworkProcessCreationParameters.h:
+        (CoreIPC):
+        (WebKit):
+        (NetworkProcessCreationParameters):
+
+        Use them to message the NetworkProcess what it's application name should be:
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didFinishLaunching):
+        * UIProcess/Network/NetworkProcessProxy.h:
+        (WebKit):
+        (NetworkProcessProxy):
+        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
+        (WebKit):
+        (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess):        
+
+        Add basic message handling and initialization to the NetworkProcess itself:
+        * NetworkProcess/NetworkProcess.messages.in: Added.
+        * Platform/CoreIPC/MessageID.h:
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::didReceiveMessage):
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        (WebKit):
+        * NetworkProcess/NetworkProcess.h:
+        (WebKit):
+        (NetworkProcess):
+
+        Set a reasonable application name to be revealed in UI:
+        * NetworkProcess/mac/NetworkProcessMac.mm:
+        (WebKit):
+        (WebKit::NetworkProcess::platformInitialize):
+
+
 2012-10-12  Ada Chan  <adachan@apple.com>
 
         Add WKPage API to get whether the main frame is pinned to the top or bottom edge
index 317cbc7..aff2924 100644 (file)
@@ -22,6 +22,7 @@
 
 VPATH = \
     $(WebKit2) \
+    $(WebKit2)/NetworkProcess \
     $(WebKit2)/PluginProcess \
     $(WebKit2)/PluginProcess/mac \
     $(WebKit2)/Shared/Plugins \
@@ -52,6 +53,7 @@ MESSAGE_RECEIVERS = \
     DrawingAreaProxy \
     DownloadProxy \
     EventDispatcher \
+    NetworkProcess \
     NPObjectMessageReceiver \
     PluginControllerProxy \
     PluginProcess \
index d6f3f94..b2289b0 100644 (file)
@@ -66,6 +66,7 @@ bool NetworkProcess::shouldTerminate()
 
 void NetworkProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
 {
+    didReceiveNetworkProcessMessage(connection, messageID, arguments);
 }
 
 void NetworkProcess::didClose(CoreIPC::Connection*)
@@ -86,6 +87,11 @@ void NetworkProcess::syncMessageSendTimedOut(CoreIPC::Connection*)
 {
 }
 
+void NetworkProcess::initializeNetworkProcess(const NetworkProcessCreationParameters& parameters)
+{
+    platformInitialize(parameters);
+}
+
 } // namespace WebKit
 
 #endif // ENABLE(NETWORK_PROCESS)
index 8575776..f72a8f9 100644 (file)
@@ -36,6 +36,8 @@ namespace WebCore {
 }
 
 namespace WebKit {
+    
+struct NetworkProcessCreationParameters;
 
 class NetworkProcess : ChildProcess {
     WTF_MAKE_NONCOPYABLE(NetworkProcess);
@@ -48,6 +50,8 @@ private:
     NetworkProcess();
     ~NetworkProcess();
 
+    void platformInitialize(const NetworkProcessCreationParameters&);
+
     // ChildProcess
     virtual bool shouldTerminate();
 
@@ -57,6 +61,10 @@ private:
     virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
     virtual void syncMessageSendTimedOut(CoreIPC::Connection*);
 
+    // Message Handlers
+    void didReceiveNetworkProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+    void initializeNetworkProcess(const NetworkProcessCreationParameters&);
+
     // The connection to the UI process.
     RefPtr<CoreIPC::Connection> m_uiConnection;
 };
diff --git a/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in
new file mode 100644 (file)
index 0000000..5e46a8e
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 2012 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(NETWORK_PROCESS)
+
+messages -> NetworkProcess {
+    # Initializes the network process.
+    InitializeNetworkProcess(WebKit::NetworkProcessCreationParameters processCreationParameters)
+}
+
+#endif // ENABLE(NETWORK_PROCESS)
diff --git a/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm b/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm
new file mode 100644 (file)
index 0000000..e635acb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#import "config.h"
+#import "NetworkProcess.h"
+
+#if ENABLE(NETWORK_PROCESS)
+
+#import "NetworkProcessCreationParameters.h"
+#import <WebCore/LocalizedStrings.h>
+#import <WebKitSystemInterface.h>
+#import <wtf/text/WTFString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void NetworkProcess::platformInitialize(const NetworkProcessCreationParameters& parameters)
+{
+    NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Networking", "visible name of the network process. The argument is the application name."),
+        (NSString *)parameters.parentProcessName];
+    
+    WKSetVisibleApplicationName((CFStringRef)applicationName);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(NETWORK_PROCESS)
index 14ec827..5c21336 100644 (file)
@@ -105,6 +105,9 @@ enum MessageClass {
 
     // NPObject messages sent by both the plug-in process and the web process.
     MessageClassNPObjectMessageReceiver,
+    
+    // Messages sent by the UI process to the network process.
+    MessageClassNetworkProcess,
 };
 
 template<typename> struct MessageKindTraits { };
index bd9dc9a..c02cbf6 100644 (file)
@@ -197,6 +197,7 @@ def struct_or_class(namespace, type):
         'WebKit::DictionaryPopupInfo',
         'WebKit::DrawingAreaInfo',
         'WebKit::EditorState',
+        'WebKit::NetworkProcessCreationParameters',
         'WebKit::PlatformPopupMenuData',
         'WebKit::PluginCreationParameters',
         'WebKit::PluginProcessCreationParameters',
diff --git a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp
new file mode 100644 (file)
index 0000000..efbe357
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 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 "config.h"
+#include "NetworkProcessCreationParameters.h"
+
+#if ENABLE(NETWORK_PROCESS)
+
+#include "ArgumentCoders.h"
+
+namespace WebKit {
+
+NetworkProcessCreationParameters::NetworkProcessCreationParameters()
+{
+}
+
+void NetworkProcessCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+#if PLATFORM(MAC)
+    encoder->encode(parentProcessName);
+#endif
+}
+
+bool NetworkProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, NetworkProcessCreationParameters& result)
+{
+#if PLATFORM(MAC)
+    if (!decoder->decode(result.parentProcessName))
+        return false;
+#endif
+
+    return true;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(NETWORK_PROCESS)
diff --git a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h
new file mode 100644 (file)
index 0000000..4f59e29
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 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 NetworkProcessCreationParameters_h
+#define NetworkProcessCreationParameters_h
+
+#if ENABLE(NETWORK_PROCESS)
+
+#include <wtf/text/WTFString.h>
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+struct NetworkProcessCreationParameters {
+    NetworkProcessCreationParameters();
+
+    void encode(CoreIPC::ArgumentEncoder*) const;
+    static bool decode(CoreIPC::ArgumentDecoder*, NetworkProcessCreationParameters&);
+
+#if PLATFORM(MAC)
+    String parentProcessName;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(NETWORK_PROCESS)
+
+#endif // NetworkProcessCreationParameters_h
index 492887d..fe52835 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "NetworkProcessProxy.h"
 
+#include "NetworkProcessCreationParameters.h"
+#include "NetworkProcessMessages.h"
 #include <WebCore/RunLoop.h>
 
 #if ENABLE(NETWORK_PROCESS)
@@ -95,6 +97,12 @@ void NetworkProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connecti
 #endif
 
     m_connection->open();
+
+    NetworkProcessCreationParameters parameters;
+    platformInitializeNetworkProcess(parameters);
+
+    // Initialize the network host process.
+    m_connection->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);
 }
 
 } // namespace WebKit
index 9a5ed94..57e37e6 100644 (file)
@@ -35,6 +35,8 @@
 
 namespace WebKit {
 
+struct NetworkProcessCreationParameters;
+
 class NetworkProcessProxy : public RefCounted<NetworkProcessProxy>, CoreIPC::Connection::Client, ProcessLauncher::Client {
 public:
     static PassRefPtr<NetworkProcessProxy> create();
@@ -43,6 +45,8 @@ public:
 private:
     NetworkProcessProxy();
 
+    void platformInitializeNetworkProcess(NetworkProcessCreationParameters&);
+
     // CoreIPC::Connection::Client
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     virtual void didClose(CoreIPC::Connection*);
diff --git a/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm b/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm
new file mode 100644 (file)
index 0000000..440cc42
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#import "config.h"
+#import "NetworkProcessProxy.h"
+
+#import "NetworkProcessCreationParameters.h"
+
+#if ENABLE(NETWORK_PROCESS)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void NetworkProcessProxy::platformInitializeNetworkProcess(NetworkProcessCreationParameters& parameters)
+{
+    parameters.parentProcessName = [[NSProcessInfo processInfo] processName];
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(NETWORK_PROCESS)
index 40d74f7..b6e004a 100644 (file)
                5153569D1291B1D2000749DC /* WebPageContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5153569B1291B1D2000749DC /* WebPageContextMenuClient.h */; };
                51578B831209ECEF00A37C4A /* WebData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578B821209ECEF00A37C4A /* WebData.h */; };
                5160BFE113381DF900918999 /* Logging.mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160BFE013381DF900918999 /* Logging.mac.mm */; };
+               516319921628980A00E22F00 /* NetworkProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 516319911628980A00E22F00 /* NetworkProcessProxyMac.mm */; };
+               5163199416289A6000E22F00 /* NetworkProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ACC9341628064800342550 /* NetworkProcessMessageReceiver.cpp */; };
+               5163199516289A6300E22F00 /* NetworkProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ACC9351628064800342550 /* NetworkProcessMessages.h */; };
                516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
                51795565162876C500FA43B6 /* NetworkProcessMainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 510CC7DD16138E2900D03ED3 /* NetworkProcessMainMac.mm */; };
+               51795567162876CB00FA43B6 /* NetworkProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8A6151627F3F9000D90E9 /* NetworkProcessMac.mm */; };
                51795568162876CF00FA43B6 /* NetworkProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510CC7DF16138E2900D03ED3 /* NetworkProcess.cpp */; };
                51795569162876EE00FA43B6 /* NetworkProcessMain.h in Headers */ = {isa = PBXBuildFile; fileRef = 510CC7E116138E2900D03ED3 /* NetworkProcessMain.h */; };
                5179556A162876F300FA43B6 /* NetworkProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 510CC7E016138E2900D03ED3 /* NetworkProcess.h */; };
                5179556D162877B100FA43B6 /* NetworkProcessProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510CC7EA16138E7200D03ED3 /* NetworkProcessProxy.cpp */; };
                5179556E162877B300FA43B6 /* NetworkProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 510CC7EB16138E7200D03ED3 /* NetworkProcessProxy.h */; };
+               51795570162877CF00FA43B6 /* NetworkProcessCreationParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A8A6121627F325000D90E9 /* NetworkProcessCreationParameters.cpp */; };
+               51795571162877D200FA43B6 /* NetworkProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A8A60F1627F2BD000D90E9 /* NetworkProcessCreationParameters.h */; };
                51834592134532E90092B696 /* WebIconDatabaseClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51834590134532E80092B696 /* WebIconDatabaseClient.cpp */; };
                51834593134532E90092B696 /* WebIconDatabaseClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 51834591134532E80092B696 /* WebIconDatabaseClient.h */; };
                5183B3921379F7B800E8754E /* WebProcessShim.dylib in Copy Web Process Shim */ = {isa = PBXBuildFile; fileRef = 510031F61379CACB00C8DFE4 /* WebProcessShim.dylib */; };
                5153569B1291B1D2000749DC /* WebPageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageContextMenuClient.h; sourceTree = "<group>"; };
                51578B821209ECEF00A37C4A /* WebData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebData.h; sourceTree = "<group>"; };
                5160BFE013381DF900918999 /* Logging.mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Logging.mac.mm; sourceTree = "<group>"; };
+               516319911628980A00E22F00 /* NetworkProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessProxyMac.mm; path = mac/NetworkProcessProxyMac.mm; sourceTree = "<group>"; };
                516A4A5B120A2CCD00C05B7F /* WebError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebError.h; sourceTree = "<group>"; };
                517A33B3130B308C00F80CB5 /* WKApplicationCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKApplicationCacheManager.cpp; sourceTree = "<group>"; };
                517A33B4130B308C00F80CB5 /* WKApplicationCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKApplicationCacheManager.h; sourceTree = "<group>"; };
                51A7F2F2125BF820008AEB1D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logging.h; sourceTree = "<group>"; };
                51A7F2F4125BF8D4008AEB1D /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Logging.cpp; sourceTree = "<group>"; };
                51A84CE2127F386B00CA6EA4 /* WebContextMenuProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenuProxy.cpp; sourceTree = "<group>"; };
+               51A8A60F1627F2BD000D90E9 /* NetworkProcessCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessCreationParameters.h; path = Network/NetworkProcessCreationParameters.h; sourceTree = "<group>"; };
+               51A8A6121627F325000D90E9 /* NetworkProcessCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessCreationParameters.cpp; path = Network/NetworkProcessCreationParameters.cpp; sourceTree = "<group>"; };
+               51A8A6151627F3F9000D90E9 /* NetworkProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkProcessMac.mm; sourceTree = "<group>"; };
+               51A8A6171627F5BB000D90E9 /* NetworkProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NetworkProcess.messages.in; path = NetworkProcess/NetworkProcess.messages.in; sourceTree = "<group>"; };
                51A9E0FC1315CCDE009E7031 /* WebKeyValueStorageManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebKeyValueStorageManager.cpp; path = KeyValueStorage/WebKeyValueStorageManager.cpp; sourceTree = "<group>"; };
                51A9E0FD1315CCDE009E7031 /* WebKeyValueStorageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebKeyValueStorageManager.h; path = KeyValueStorage/WebKeyValueStorageManager.h; sourceTree = "<group>"; };
                51A9E0FE1315CCDE009E7031 /* WebKeyValueStorageManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebKeyValueStorageManager.messages.in; path = KeyValueStorage/WebKeyValueStorageManager.messages.in; sourceTree = "<group>"; };
                51ACBB81127A8BAD00D203B9 /* WebContextMenuProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenuProxy.h; sourceTree = "<group>"; };
                51ACBB9E127A8F2C00D203B9 /* WebContextMenuProxyMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenuProxyMac.h; sourceTree = "<group>"; };
                51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMenuProxyMac.mm; sourceTree = "<group>"; };
+               51ACC9341628064800342550 /* NetworkProcessMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkProcessMessageReceiver.cpp; sourceTree = "<group>"; };
+               51ACC9351628064800342550 /* NetworkProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkProcessMessages.h; sourceTree = "<group>"; };
                51B15A8213843A3900321AD8 /* EnvironmentUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EnvironmentUtilities.cpp; path = unix/EnvironmentUtilities.cpp; sourceTree = "<group>"; };
                51B15A8313843A3900321AD8 /* EnvironmentUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EnvironmentUtilities.h; path = unix/EnvironmentUtilities.h; sourceTree = "<group>"; };
                51B3004E12529D0E000B5CA0 /* WebBackForwardListCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebBackForwardListCF.cpp; path = cf/WebBackForwardListCF.cpp; sourceTree = "<group>"; };
                                C01A25FF12662F2100C9ED55 /* cg */,
                                BC111B5F112F635E00337BAB /* CoreIPCSupport */,
                                BC111B5A112F628200337BAB /* mac */,
+                               51A8A60D1627F2AC000D90E9 /* Network */,
                                1AAE058C1279DCD400852418 /* Plugins */,
                                1A3DD205125E5A2F004515E6 /* APIClient.h */,
                                5D51845313BCF9CC00C7FF4A /* APIClientTraits.cpp */,
                                510CC7DC16138E2900D03ED3 /* mac */,
                                510CC7DF16138E2900D03ED3 /* NetworkProcess.cpp */,
                                510CC7E016138E2900D03ED3 /* NetworkProcess.h */,
+                               51A8A6171627F5BB000D90E9 /* NetworkProcess.messages.in */,
                                510CC7E116138E2900D03ED3 /* NetworkProcessMain.h */,
                        );
                        name = NetworkProcess;
                510CC7DC16138E2900D03ED3 /* mac */ = {
                        isa = PBXGroup;
                        children = (
+                               51A8A6151627F3F9000D90E9 /* NetworkProcessMac.mm */,
                                510CC7DD16138E2900D03ED3 /* NetworkProcessMainMac.mm */,
                        );
                        name = mac;
                510CC7E716138E7200D03ED3 /* Network */ = {
                        isa = PBXGroup;
                        children = (
+                               516319931628980E00E22F00 /* mac */,
                                510CC7EA16138E7200D03ED3 /* NetworkProcessProxy.cpp */,
                                510CC7EB16138E7200D03ED3 /* NetworkProcessProxy.h */,
                        );
                        path = Authentication;
                        sourceTree = "<group>";
                };
+               516319931628980E00E22F00 /* mac */ = {
+                       isa = PBXGroup;
+                       children = (
+                               516319911628980A00E22F00 /* NetworkProcessProxyMac.mm */,
+                       );
+                       name = mac;
+                       sourceTree = "<group>";
+               };
+               51A8A60D1627F2AC000D90E9 /* Network */ = {
+                       isa = PBXGroup;
+                       children = (
+                               51A8A6121627F325000D90E9 /* NetworkProcessCreationParameters.cpp */,
+                               51A8A60F1627F2BD000D90E9 /* NetworkProcessCreationParameters.h */,
+                       );
+                       name = Network;
+                       sourceTree = "<group>";
+               };
                51A9E0FB1315CC0E009E7031 /* KeyValueStorage */ = {
                        isa = PBXGroup;
                        children = (
                                1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */,
                                1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */,
                                1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */,
+                               51ACC9341628064800342550 /* NetworkProcessMessageReceiver.cpp */,
+                               51ACC9351628064800342550 /* NetworkProcessMessages.h */,
                                1A2D8437127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp */,
                                1A2D8438127F65D5001EB962 /* NPObjectMessageReceiverMessages.h */,
                                1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */,
                                51795569162876EE00FA43B6 /* NetworkProcessMain.h in Headers */,
                                5179556A162876F300FA43B6 /* NetworkProcess.h in Headers */,
                                5179556E162877B300FA43B6 /* NetworkProcessProxy.h in Headers */,
+                               51795571162877D200FA43B6 /* NetworkProcessCreationParameters.h in Headers */,
+                               5163199516289A6300E22F00 /* NetworkProcessMessages.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                1A1FEC1C1627B45700700F6D /* WebConnectionMessageReceiver.cpp in Sources */,
                                293EBEAC1627D9C9005F89F1 /* WKDOMText.mm in Sources */,
                                51795565162876C500FA43B6 /* NetworkProcessMainMac.mm in Sources */,
+                               51795567162876CB00FA43B6 /* NetworkProcessMac.mm in Sources */,
                                51795568162876CF00FA43B6 /* NetworkProcess.cpp in Sources */,
                                5179556D162877B100FA43B6 /* NetworkProcessProxy.cpp in Sources */,
+                               51795570162877CF00FA43B6 /* NetworkProcessCreationParameters.cpp in Sources */,
+                               516319921628980A00E22F00 /* NetworkProcessProxyMac.mm in Sources */,
+                               5163199416289A6000E22F00 /* NetworkProcessMessageReceiver.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };