[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

timothy at apple.com timothy at apple.com
Wed Dec 22 15:45:52 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 12d0118ccabee1d2d4984847bda7810412882157
Author: timothy at apple.com <timothy at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 23:43:34 2010 +0000

    Create and load the Web Inspector page.
    
    https://webkit.org/b/49207
    
    Reviewed by Anders Carlsson.
    
    * UIProcess/WebInspectorProxy.cpp:
    (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
    call WebPageProxy::loadURL with inspectorPageURL.
    (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
    * UIProcess/WebInspectorProxy.h:
    * UIProcess/WebInspectorProxy.messages.in: Added.
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
    (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
    * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
    
    * UIProcess/mac/WebInspectorProxyMac.mm:
    (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
    (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
    * UIProcess/qt/WebInspectorProxyQt.cpp:
    (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
    (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
    * UIProcess/win/WebInspectorProxyWin.cpp:
    (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
    (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
    
    * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
    (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
    (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
    * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
    (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
    (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
    * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
    
    * WebProcess/WebPage/WebInspector.cpp:
    (WebKit::WebInspector::WebInspector):
    (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
    the WebPage using the result page ID.
    (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
    * WebProcess/WebPage/WebInspector.h:
    (WebKit::WebInspector::inspectorPage): Added.
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
    
    * WebProcess/WebPage/mac/WebInspectorMac.mm:
    (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
    * WebProcess/WebPage/qt/WebInspectorQt.cpp:
    (WebKit::WebInspector::localizedStringsURL): Added stub.
    * WebProcess/WebPage/win/WebInspectorWin.cpp:
    (WebKit::WebInspector::localizedStringsURL): Added stub.
    
    * DerivedSources.make: Added WebInspectorProxy.messages.in.
    * DerivedSources.pro: Ditto.
    
    * WebKit2.pro: Added new files.
    * WebKit2.xcodeproj/project.pbxproj: Ditto.
    * win/WebKit2.vcproj: Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 9a53d89..d2ff735 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,64 @@
+2010-11-08  Timothy Hatcher  <timothy at apple.com>
+
+        Create and load the Web Inspector page.
+
+        https://webkit.org/b/49207
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
+        call WebPageProxy::loadURL with inspectorPageURL.
+        (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
+        * UIProcess/WebInspectorProxy.h:
+        * UIProcess/WebInspectorProxy.messages.in: Added.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
+        (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
+        * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
+        (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
+        * UIProcess/qt/WebInspectorProxyQt.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
+        (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
+        * UIProcess/win/WebInspectorProxyWin.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
+        (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
+
+        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+        (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
+        (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
+        (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
+        (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
+
+        * WebProcess/WebPage/WebInspector.cpp:
+        (WebKit::WebInspector::WebInspector):
+        (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
+        the WebPage using the result page ID.
+        (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
+        * WebProcess/WebPage/WebInspector.h:
+        (WebKit::WebInspector::inspectorPage): Added.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
+
+        * WebProcess/WebPage/mac/WebInspectorMac.mm:
+        (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
+        * WebProcess/WebPage/qt/WebInspectorQt.cpp:
+        (WebKit::WebInspector::localizedStringsURL): Added stub.
+        * WebProcess/WebPage/win/WebInspectorWin.cpp:
+        (WebKit::WebInspector::localizedStringsURL): Added stub.
+
+        * DerivedSources.make: Added WebInspectorProxy.messages.in.
+        * DerivedSources.pro: Ditto.
+
+        * WebKit2.pro: Added new files.
+        * WebKit2.xcodeproj/project.pbxproj: Ditto.
+        * win/WebKit2.vcproj: Ditto.
+
 2010-11-11  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit2/DerivedSources.make b/WebKit2/DerivedSources.make
index 354e92c..dafeae9 100644
--- a/WebKit2/DerivedSources.make
+++ b/WebKit2/DerivedSources.make
@@ -38,8 +38,9 @@ MESSAGE_RECEIVERS = \
     PluginProcess \
     PluginProcessProxy \
     PluginProxy \
-    WebInspector \
     WebContext \
+    WebInspector \
+    WebInspectorProxy \
     WebPage \
     WebPageProxy \
     WebProcess \
diff --git a/WebKit2/DerivedSources.pro b/WebKit2/DerivedSources.pro
index 2e3b23d..a01c15a 100644
--- a/WebKit2/DerivedSources.pro
+++ b/WebKit2/DerivedSources.pro
@@ -95,6 +95,7 @@ MESSAGE_RECEIVERS = \
     PluginProcessProxy.messages.in \
     PluginProxy.messages.in \
     WebContext.messages.in \
+    WebInspectorProxy.messages.in \
     WebPage/WebInspector.messages.in \
     WebPage/WebPage.messages.in \
     WebPageProxy.messages.in \
diff --git a/WebKit2/UIProcess/WebInspectorProxy.cpp b/WebKit2/UIProcess/WebInspectorProxy.cpp
index cfef786..83f4a44 100644
--- a/WebKit2/UIProcess/WebInspectorProxy.cpp
+++ b/WebKit2/UIProcess/WebInspectorProxy.cpp
@@ -27,6 +27,7 @@
 
 #include "WebInspectorMessages.h"
 #include "WebPageProxy.h"
+#include "WebPageCreationParameters.h"
 #include "WebProcessProxy.h"
 
 #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
@@ -135,4 +136,28 @@ void WebInspectorProxy::togglePageProfiling()
     m_isProfilingPage = !m_isProfilingPage;
 }
 
+// Called by WebInspectorProxy messages
+void WebInspectorProxy::createInspectorPage(uint64_t& inspectorPageID, WebPageCreationParameters& inspectorPageParameters)
+{
+    inspectorPageID = 0;
+
+    if (!m_page)
+        return;
+
+    WebPageProxy* inspectorPage = platformCreateInspectorPage();
+    ASSERT(inspectorPage);
+    if (!inspectorPage)
+        return;
+
+    inspectorPageID = inspectorPage->pageID();
+    inspectorPageParameters = inspectorPage->creationParameters(IntSize(0, 0));
+
+    inspectorPage->loadURL(inspectorPageURL());
+}
+
+void WebInspectorProxy::didLoadInspectorPage()
+{
+    // FIXME: show the window or attach the inspector here.
+}
+
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/WebInspectorProxy.h b/WebKit2/UIProcess/WebInspectorProxy.h
index 9141136..5548f7f 100644
--- a/WebKit2/UIProcess/WebInspectorProxy.h
+++ b/WebKit2/UIProcess/WebInspectorProxy.h
@@ -27,12 +27,23 @@
 #define WebInspectorProxy_h
 
 #include "APIObject.h"
+#include "Connection.h"
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 
+#if PLATFORM(MAC)
+#include <wtf/RetainPtr.h>
+#ifdef __OBJC__
+ at class WKView;
+#else
+class WKView;
+#endif
+#endif
+
 namespace WebKit {
 
 class WebPageProxy;
+struct WebPageCreationParameters;
 
 class WebInspectorProxy : public APIObject {
 public:
@@ -69,11 +80,24 @@ public:
     bool isProfilingPage() const { return m_isProfilingPage; }
     void togglePageProfiling();
 
+    // Implemented in generated WebInspectorProxyMessageReceiver.cpp
+    void didReceiveWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+    CoreIPC::SyncReplyMode didReceiveSyncWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
+
 private:
     WebInspectorProxy(WebPageProxy* page);
 
     virtual Type type() const { return APIType; }
 
+    WebPageProxy* platformCreateInspectorPage();
+
+    // Implemented the platform WebInspectorProxy file
+    String inspectorPageURL() const;
+
+    // Called by WebInspectorProxy messages
+    void createInspectorPage(uint64_t& inspectorPageID, WebPageCreationParameters&);
+    void didLoadInspectorPage();
+
     WebPageProxy* m_page;
 
     bool m_isVisible;
@@ -81,6 +105,10 @@ private:
     bool m_isDebuggingJavaScript;
     bool m_isProfilingJavaScript;
     bool m_isProfilingPage;
+
+#if PLATFORM(MAC)
+    RetainPtr<WKView> m_inspectorView;
+#endif
 };
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/WebInspectorProxy.messages.in b/WebKit2/UIProcess/WebInspectorProxy.messages.in
new file mode 100644
index 0000000..3266260
--- /dev/null
+++ b/WebKit2/UIProcess/WebInspectorProxy.messages.in
@@ -0,0 +1,26 @@
+# 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.
+
+messages -> WebInspectorProxy {
+    CreateInspectorPage() -> (uint64_t inspectorPageID, WebKit::WebPageCreationParameters inspectorPageParameters)
+    DidLoadInspectorPage()
+}
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 3e0ed93..c5509d3 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -625,6 +625,12 @@ void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::M
         return;
     }
 
+    if (messageID.is<CoreIPC::MessageClassWebInspectorProxy>()) {
+        if (WebInspectorProxy* inspector = this->inspector())
+            inspector->didReceiveWebInspectorProxyMessage(connection, messageID, arguments);
+        return;
+    }
+
     didReceiveWebPageProxyMessage(connection, messageID, arguments);
 }
 
@@ -635,6 +641,12 @@ void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIP
         return;
     }
 
+    if (messageID.is<CoreIPC::MessageClassWebInspectorProxy>()) {
+        if (WebInspectorProxy* inspector = this->inspector())
+            inspector->didReceiveSyncWebInspectorProxyMessage(connection, messageID, arguments, reply);
+        return;
+    }
+
     // FIXME: Do something with reply.
     didReceiveSyncWebPageProxyMessage(connection, messageID, arguments, reply);
 }
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 8579365..b47ec19 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -244,6 +244,8 @@ public:
 
     void contextMenuItemSelected(const WebContextMenuItemData&);
 
+    WebPageCreationParameters creationParameters(const WebCore::IntSize&) const;
+
 private:
     WebPageProxy(WebPageNamespace*, uint64_t pageID);
 
@@ -354,8 +356,6 @@ private:
 
     void focusedFrameChanged(uint64_t frameID);
 
-    WebPageCreationParameters creationParameters(const WebCore::IntSize&) const;
-
 #if USE(ACCELERATED_COMPOSITING)
     void didChangeAcceleratedCompositing(bool compositing, DrawingAreaBase::DrawingAreaInfo&);
 #endif    
diff --git a/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm b/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
new file mode 100644
index 0000000..b3af393
--- /dev/null
+++ b/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+#import "WebInspectorProxy.h"
+
+#import "WKAPICast.h"
+#import "WKView.h"
+#import "WebPageProxy.h"
+#import <wtf/text/WTFString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
+{
+    ASSERT(m_page);
+    ASSERT(!m_inspectorView);
+
+    m_inspectorView.adoptNS([[WKView alloc] initWithFrame:NSZeroRect pageNamespaceRef:toAPI(m_page->pageNamespace())]);
+    ASSERT(m_inspectorView);
+
+    return toImpl([m_inspectorView.get() pageRef]);
+}
+
+String WebInspectorProxy::inspectorPageURL() const
+{
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
+    ASSERT(path);
+
+    return [[NSURL fileURLWithPath:path] absoluteString];
+}
+
+} // namespace WebKit
diff --git a/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp b/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp
new file mode 100644
index 0000000..d760c1c
--- /dev/null
+++ b/WebKit2/UIProcess/qt/WebInspectorProxyQt.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#import "WebInspectorProxy.h"
+
+#import <wtf/text/WTFString.h>
+
+#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
+{
+    notImplemented();
+    return 0;
+}
+
+String WebInspectorProxy::inspectorPageURL() const
+{
+    notImplemented();
+    return String();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp b/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp
new file mode 100644
index 0000000..d760c1c
--- /dev/null
+++ b/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#import "WebInspectorProxy.h"
+
+#import <wtf/text/WTFString.h>
+
+#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
+{
+    notImplemented();
+    return 0;
+}
+
+String WebInspectorProxy::inspectorPageURL() const
+{
+    notImplemented();
+    return String();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index 3f66c92..27608a1 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -156,6 +156,7 @@ WEBKIT2_GENERATED_HEADERS = \
     $$OUTPUT_DIR/WebKit2/generated/PluginProxyMessages.h \
     $$OUTPUT_DIR/WebKit2/generated/WebContextMessages.h \
     $$OUTPUT_DIR/WebKit2/generated/WebInspectorMessages.h \
+    $$OUTPUT_DIR/WebKit2/generated/WebInspectorProxyMessages.h \
     $$OUTPUT_DIR/WebKit2/generated/WebPageMessages.h \
     $$OUTPUT_DIR/WebKit2/generated/WebPageProxyMessages.h \
     $$OUTPUT_DIR/WebKit2/generated/WebProcessConnectionMessages.h \
@@ -170,6 +171,7 @@ WEBKIT2_GENERATED_SOURCES = \
     $$OUTPUT_DIR/WebKit2/generated/PluginProxyMessageReceiver.cpp \
     $$OUTPUT_DIR/WebKit2/generated/WebContextMessageReceiver.cpp \
     $$OUTPUT_DIR/WebKit2/generated/WebInspectorMessageReceiver.cpp \
+    $$OUTPUT_DIR/WebKit2/generated/WebInspectorProxyMessageReceiver.cpp \
     $$OUTPUT_DIR/WebKit2/generated/WebPageMessageReceiver.cpp \
     $$OUTPUT_DIR/WebKit2/generated/WebPageProxyMessageReceiver.cpp \
     $$OUTPUT_DIR/WebKit2/generated/WebProcessConnectionMessageReceiver.cpp \
@@ -191,11 +193,11 @@ HEADERS += \
     Platform/Logging.h \
     Platform/Module.h \
     Platform/PlatformProcessIdentifier.h \
-    Platform/qt/MappedMemoryPool.h \
     Platform/RunLoop.h \
     Platform/SharedMemory.h \
     Platform/WorkItem.h \
     Platform/WorkQueue.h \
+    Platform/qt/MappedMemoryPool.h \
     Shared/API/c/WKBase.h \
     Shared/API/c/WKCertificateInfo.h \
     Shared/API/c/WKGeometry.h \
@@ -209,11 +211,11 @@ HEADERS += \
     Shared/API/c/WKURLRequest.h \
     Shared/API/c/WKURLResponse.h \
     Shared/API/c/WKUserContentURLPattern.h \
-    Shared/CoreIPCSupport/DrawingAreaMessageKinds.h \
-    Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h \
     Shared/BackingStore.h \
     Shared/CacheModel.h \
     Shared/ChildProcess.h \
+    Shared/CoreIPCSupport/DrawingAreaMessageKinds.h \
+    Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h \
     Shared/DrawingAreaBase.h \
     Shared/ImmutableArray.h \
     Shared/ImmutableDictionary.h \
@@ -221,30 +223,29 @@ HEADERS += \
     Shared/MutableDictionary.h \
     Shared/NativeWebKeyboardEvent.h \
     Shared/NotImplemented.h \
-    Shared/StringPairVector.h \
-    Shared/qt/CrashHandler.h \
-    Shared/qt/PlatformCertificateInfo.h \
-    Shared/qt/UpdateChunk.h \
-    Shared/qt/WebEventFactoryQt.h \
     Shared/PlatformPopupMenuData.h \
+    Shared/StringPairVector.h \
     Shared/UserMessageCoders.h \
     Shared/VisitedLinkTable.h \
     Shared/WebCertificateInfo.h \
     Shared/WebContextMenuItem.h \
     Shared/WebContextMenuItemData.h \
-    Shared/WebEvent.h \
     Shared/WebError.h \
+    Shared/WebEvent.h \
     Shared/WebEventConversion.h \
     Shared/WebNavigationDataStore.h \
     Shared/WebNumber.h \
     Shared/WebPageCreationParameters.h \
     Shared/WebPopupItem.h \
-    Shared/WebProcessCreationParameters.h \
     Shared/WebPreferencesStore.h \
+    Shared/WebProcessCreationParameters.h \
     Shared/WebURLRequest.h \
     Shared/WebURLResponse.h \
     Shared/WebUserContentURLPattern.h \
-    UIProcess/API/C/WebKit2.h \
+    Shared/qt/CrashHandler.h \
+    Shared/qt/PlatformCertificateInfo.h \
+    Shared/qt/UpdateChunk.h \
+    Shared/qt/WebEventFactoryQt.h \
     UIProcess/API/C/WKAPICast.h \
     UIProcess/API/C/WKBackForwardList.h \
     UIProcess/API/C/WKBackForwardListItem.h \
@@ -260,10 +261,12 @@ HEADERS += \
     UIProcess/API/C/WKPagePrivate.h \
     UIProcess/API/C/WKPreferences.h \
     UIProcess/API/C/WKPreferencesPrivate.h \
+    UIProcess/API/C/WebKit2.h \
     UIProcess/API/C/qt/WKNativeEvent.h \
+    UIProcess/API/cpp/WKRetainPtr.h \
     UIProcess/API/cpp/qt/WKStringQt.h \
     UIProcess/API/cpp/qt/WKURLQt.h \
-    UIProcess/API/cpp/WKRetainPtr.h \
+    UIProcess/API/qt/ClientImpl.h \
     UIProcess/API/qt/qgraphicswkview.h \
     UIProcess/API/qt/qwkhistory.h \
     UIProcess/API/qt/qwkhistory_p.h \
@@ -271,16 +274,15 @@ HEADERS += \
     UIProcess/API/qt/qwkpage_p.h \
     UIProcess/API/qt/qwkpreferences.h \
     UIProcess/ChunkedUpdateDrawingAreaProxy.h \
+    UIProcess/Downloads/DownloadProxy.h \
     UIProcess/DrawingAreaProxy.h \
     UIProcess/FindIndicator.h \
     UIProcess/GenericCallback.h \
-    UIProcess/Downloads/DownloadProxy.h \
     UIProcess/Launcher/ProcessLauncher.h \
     UIProcess/Launcher/ThreadLauncher.h \
-    UIProcess/Plugins/PluginInfoStore.h \
     UIProcess/PageClient.h \
+    UIProcess/Plugins/PluginInfoStore.h \
     UIProcess/ProcessModel.h \
-    UIProcess/API/qt/ClientImpl.h \
     UIProcess/ResponsivenessTimer.h \
     UIProcess/VisitedLinkProvider.h \
     UIProcess/WebContext.h \
@@ -327,11 +329,8 @@ HEADERS += \
     WebProcess/InjectedBundle/InjectedBundlePageUIClient.h \
     WebProcess/InjectedBundle/InjectedBundleScriptWorld.h \
     WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h \
-    WebProcess/Plugins/Plugin.h \
-    WebProcess/Plugins/PluginController.h \
-    WebProcess/Plugins/PluginView.h \
-    WebProcess/Plugins/Netscape/JSNPObject.h \
     WebProcess/Plugins/Netscape/JSNPMethod.h \
+    WebProcess/Plugins/Netscape/JSNPObject.h \
     WebProcess/Plugins/Netscape/NPJSObject.h \
     WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h \
     WebProcess/Plugins/Netscape/NPRuntimeUtilities.h \
@@ -339,6 +338,9 @@ HEADERS += \
     WebProcess/Plugins/Netscape/NetscapePlugin.h \
     WebProcess/Plugins/Netscape/NetscapePluginModule.h \
     WebProcess/Plugins/Netscape/NetscapePluginStream.h \
+    WebProcess/Plugins/Plugin.h \
+    WebProcess/Plugins/PluginController.h \
+    WebProcess/Plugins/PluginView.h \
     WebProcess/WebCoreSupport/WebChromeClient.h \
     WebProcess/WebCoreSupport/WebContextMenuClient.h \
     WebProcess/WebCoreSupport/WebDragClient.h \
@@ -347,9 +349,9 @@ HEADERS += \
     WebProcess/WebCoreSupport/WebFrameLoaderClient.h \
     WebProcess/WebCoreSupport/WebInspectorClient.h \
     WebProcess/WebCoreSupport/WebInspectorFrontendClient.h \
+    WebProcess/WebCoreSupport/WebPlatformStrategies.h \
     WebProcess/WebCoreSupport/WebPopupMenu.h \
     WebProcess/WebCoreSupport/WebSearchPopupMenu.h \
-    WebProcess/WebCoreSupport/WebPlatformStrategies.h \
     WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h \
     WebProcess/WebPage/ChunkedUpdateDrawingArea.h \
     WebProcess/WebPage/DrawingArea.h \
@@ -396,14 +398,6 @@ SOURCES += \
     Shared/ImmutableDictionary.cpp \
     Shared/MutableArray.cpp \
     Shared/MutableDictionary.cpp \
-    Shared/qt/BackingStoreQt.cpp \
-    Shared/qt/CrashHandler.cpp \
-    Shared/qt/NativeWebKeyboardEventQt.cpp \
-    Shared/qt/UpdateChunk.cpp \
-    Shared/qt/WebCoreArgumentCodersQt.cpp \
-    Shared/qt/WebEventFactoryQt.cpp \
-    Shared/qt/WebURLRequestQt.cpp \
-    Shared/qt/WebURLResponseQt.cpp \
     Shared/PlatformPopupMenuData.cpp \
     Shared/VisitedLinkTable.cpp \
     Shared/WebContextMenuItem.cpp \
@@ -422,6 +416,14 @@ SOURCES += \
     Shared/WebURLRequest.cpp \
     Shared/WebURLResponse.cpp \
     Shared/WebWheelEvent.cpp \
+    Shared/qt/BackingStoreQt.cpp \
+    Shared/qt/CrashHandler.cpp \
+    Shared/qt/NativeWebKeyboardEventQt.cpp \
+    Shared/qt/UpdateChunk.cpp \
+    Shared/qt/WebCoreArgumentCodersQt.cpp \
+    Shared/qt/WebEventFactoryQt.cpp \
+    Shared/qt/WebURLRequestQt.cpp \
+    Shared/qt/WebURLResponseQt.cpp \
     UIProcess/API/C/WKBackForwardList.cpp \
     UIProcess/API/C/WKBackForwardListItem.cpp \
     UIProcess/API/C/WKContext.cpp \
@@ -434,30 +436,30 @@ SOURCES += \
     UIProcess/API/C/WKPageNamespace.cpp \
     UIProcess/API/C/WKPreferences.cpp \
     UIProcess/API/C/WKPreferencesPrivate.cpp \
+    UIProcess/API/cpp/qt/WKStringQt.cpp \
+    UIProcess/API/cpp/qt/WKURLQt.cpp \
     UIProcess/API/qt/ClientImpl.cpp \
     UIProcess/API/qt/qgraphicswkview.cpp \
     UIProcess/API/qt/qwkhistory.cpp \
     UIProcess/API/qt/qwkpage.cpp \
     UIProcess/API/qt/qwkpreferences.cpp \
-    UIProcess/API/cpp/qt/WKStringQt.cpp \
-    UIProcess/API/cpp/qt/WKURLQt.cpp \
     UIProcess/ChunkedUpdateDrawingAreaProxy.cpp \
+    UIProcess/Downloads/DownloadProxy.cpp \
     UIProcess/DrawingAreaProxy.cpp \
     UIProcess/FindIndicator.cpp \
-    UIProcess/Plugins/PluginInfoStore.cpp \
-    UIProcess/Plugins/qt/PluginInfoStoreQt.cpp \
-    UIProcess/Downloads/DownloadProxy.cpp \
     UIProcess/Launcher/ProcessLauncher.cpp \
     UIProcess/Launcher/ThreadLauncher.cpp \
     UIProcess/Launcher/qt/ProcessLauncherQt.cpp \
     UIProcess/Launcher/qt/ThreadLauncherQt.cpp \
+    UIProcess/Plugins/PluginInfoStore.cpp \
+    UIProcess/Plugins/qt/PluginInfoStoreQt.cpp \
     UIProcess/ResponsivenessTimer.cpp \
     UIProcess/VisitedLinkProvider.cpp \
     UIProcess/WebBackForwardList.cpp \
     UIProcess/WebBackForwardListItem.cpp \
     UIProcess/WebContext.cpp \
-    UIProcess/WebContextMenuProxy.cpp \
     UIProcess/WebContextInjectedBundleClient.cpp \
+    UIProcess/WebContextMenuProxy.cpp \
     UIProcess/WebDownloadClient.cpp \
     UIProcess/WebEditCommandProxy.cpp \
     UIProcess/WebFindClient.cpp \
@@ -477,6 +479,10 @@ SOURCES += \
     UIProcess/WebProcessManager.cpp \
     UIProcess/WebProcessProxy.cpp \
     UIProcess/WebUIClient.cpp \
+    UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
+    UIProcess/qt/WebContextMenuProxyQt.cpp \
+    UIProcess/qt/WebContextQt.cpp \
+    UIProcess/qt/WebPopupMenuProxyQt.cpp \
     WebProcess/Downloads/Download.cpp \
     WebProcess/Downloads/DownloadManager.cpp \
     WebProcess/Downloads/qt/DownloadQt.cpp \
@@ -503,10 +509,8 @@ SOURCES += \
     WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp \
     WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp \
     WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp \
-    WebProcess/Plugins/Plugin.cpp \
-    WebProcess/Plugins/PluginView.cpp \
-    WebProcess/Plugins/Netscape/JSNPObject.cpp \
     WebProcess/Plugins/Netscape/JSNPMethod.cpp \
+    WebProcess/Plugins/Netscape/JSNPObject.cpp \
     WebProcess/Plugins/Netscape/NPJSObject.cpp \
     WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp \
     WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp \
@@ -515,6 +519,8 @@ SOURCES += \
     WebProcess/Plugins/Netscape/NetscapePluginModule.cpp \
     WebProcess/Plugins/Netscape/NetscapePluginStream.cpp \
     WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp \
+    WebProcess/Plugins/Plugin.cpp \
+    WebProcess/Plugins/PluginView.cpp \
     WebProcess/WebCoreSupport/WebChromeClient.cpp \
     WebProcess/WebCoreSupport/WebContextMenuClient.cpp \
     WebProcess/WebCoreSupport/WebDragClient.cpp \
@@ -522,9 +528,9 @@ SOURCES += \
     WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp \
     WebProcess/WebCoreSupport/WebInspectorClient.cpp \
     WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp \
+    WebProcess/WebCoreSupport/WebPlatformStrategies.cpp \
     WebProcess/WebCoreSupport/WebPopupMenu.cpp \
     WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp \
-    WebProcess/WebCoreSupport/WebPlatformStrategies.cpp \
     WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp \
     WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp \
     WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp \
@@ -532,19 +538,16 @@ SOURCES += \
     WebProcess/WebPage/DrawingArea.cpp \
     WebProcess/WebPage/FindController.cpp \
     WebProcess/WebPage/PageOverlay.cpp \
+    WebProcess/WebPage/WebBackForwardListProxy.cpp \
     WebProcess/WebPage/WebContextMenu.cpp \
     WebProcess/WebPage/WebEditCommand.cpp \
     WebProcess/WebPage/WebFrame.cpp \
     WebProcess/WebPage/WebInspector.cpp \
     WebProcess/WebPage/WebPage.cpp \
-    WebProcess/WebPage/WebBackForwardListProxy.cpp \
     WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp \
     WebProcess/WebPage/qt/WebPageQt.cpp \
     WebProcess/WebProcess.cpp \
-    UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
-    UIProcess/qt/WebContextQt.cpp \
-    UIProcess/qt/WebContextMenuProxyQt.cpp \
-    UIProcess/qt/WebPopupMenuProxyQt.cpp \
+    WebProcess/qt/WebInspectorQt.cpp \
     WebProcess/qt/WebProcessMainQt.cpp \
     WebProcess/qt/WebProcessQt.cpp \
     $$WEBKIT2_GENERATED_SOURCES
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 7d8d699..9d56ed7 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -195,6 +195,10 @@
 		512935D81288D19400A4B695 /* WebContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 512935D61288D19400A4B695 /* WebContextMenuItem.h */; };
 		512935E31288D97800A4B695 /* InjectedBundlePageContextMenuClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512935E11288D97800A4B695 /* InjectedBundlePageContextMenuClient.cpp */; };
 		512935E41288D97800A4B695 /* InjectedBundlePageContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 512935E21288D97800A4B695 /* InjectedBundlePageContextMenuClient.h */; };
+		1CA8B936127C774E00576C2B /* WebInspectorProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */; };
+		1CA8B945127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */; };
+		1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */; };
+		1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
 		51578B831209ECEF00A37C4A /* WebData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578B821209ECEF00A37C4A /* WebData.h */; };
 		516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
 		51871B5B127CB89D00F76232 /* WebContextMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51871B59127CB89D00F76232 /* WebContextMenu.cpp */; };
@@ -731,6 +735,7 @@
 		1AEFCCBC11D02C5E008219D3 /* PluginInfoStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginInfoStoreMac.mm; sourceTree = "<group>"; };
 		1AEFD27811D16C81008219D3 /* ArgumentCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCoder.h; sourceTree = "<group>"; };
 		1AEFD2F611D1807B008219D3 /* ArgumentCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCoders.h; sourceTree = "<group>"; };
+		1C77C1951288A872006A742F /* WebInspectorProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspectorProxy.messages.in; sourceTree = "<group>"; };
 		1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorFrontendClient.h; sourceTree = "<group>"; };
 		1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorFrontendClient.cpp; sourceTree = "<group>"; };
 		1C8E281E1275D15400BC7BD0 /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; };
@@ -742,6 +747,10 @@
 		1C8E2A1C1277833F00BC7BD0 /* WebInspector.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspector.messages.in; sourceTree = "<group>"; };
 		1C8E2A311277852400BC7BD0 /* WebInspectorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorMessageReceiver.cpp; sourceTree = "<group>"; };
 		1C8E2A321277852400BC7BD0 /* WebInspectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorMessages.h; sourceTree = "<group>"; };
+		1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorMac.mm; path = "/Users/timothy/Work/Safari-TOT.git/OpenSource/WebKit2/WebProcess/WebPage/mac/WebInspectorMac.mm"; sourceTree = "<absolute>"; };
+		1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorProxyMac.mm; sourceTree = "<group>"; };
+		1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+		1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = "<group>"; };
 		32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
 		510FBB981288C95E00AFFDF4 /* WebContextMenuItemData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenuItemData.cpp; sourceTree = "<group>"; };
 		510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenuItemData.h; sourceTree = "<group>"; };
@@ -1662,6 +1671,7 @@
 				BCF69F851176CD6F00471A52 /* WebHistoryClient.h */,
 				1C8E28331275D73800BC7BD0 /* WebInspectorProxy.cpp */,
 				1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */,
+				1C77C1951288A872006A742F /* WebInspectorProxy.messages.in */,
 				BCB9E76111232B9E00A137E0 /* WebLoaderClient.cpp */,
 				BC59534010FC04520098F82D /* WebLoaderClient.h */,
 				BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
@@ -1984,6 +1994,7 @@
 			children = (
 				BC5F7BB8118237990052C02C /* ChunkedUpdateDrawingAreaMac.cpp */,
 				0F5265B511DD37700006D33C /* LayerBackedDrawingAreaMac.mm */,
+				1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */,
 				BC963D6D113DD1A500574BE2 /* WebPageMac.mm */,
 			);
 			path = mac;
@@ -2006,6 +2017,7 @@
 				1A1C648611F415B700553C19 /* WebContextMac.mm */,
 				51ACBB9E127A8F2C00D203B9 /* WebContextMenuProxyMac.h */,
 				51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */,
+				1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */,
 				BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,
 				BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,
 			);
@@ -2093,6 +2105,8 @@
 				BCEE7D0C12846F69009827DA /* WebContextMessages.h */,
 				1C8E2A311277852400BC7BD0 /* WebInspectorMessageReceiver.cpp */,
 				1C8E2A321277852400BC7BD0 /* WebInspectorMessages.h */,
+				1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */,
+				1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */,
 				C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
 				C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
 				BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
@@ -2390,6 +2404,7 @@
 				1AB7D78D1288CD9A00CFD08C /* WKDownload.h in Headers */,
 				BCEE7DC5128B645D009827DA /* InjectedBundleClient.h in Headers */,
 				ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */,
+				1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2744,6 +2759,9 @@
 				1AB7D72D1288CAAD00CFD08C /* WebDownloadClient.cpp in Sources */,
 				1AB7D78E1288CD9A00CFD08C /* WKDownload.cpp in Sources */,
 				BCEE7DC6128B645D009827DA /* InjectedBundleClient.cpp in Sources */,
+				1CA8B936127C774E00576C2B /* WebInspectorProxyMac.mm in Sources */,
+				1CA8B945127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp in Sources */,
+				1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
index e93b313..a6d3855 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
@@ -25,6 +25,11 @@
 
 #include "WebInspectorClient.h"
 
+#include "WebInspectorFrontendClient.h"
+#include "WebInspector.h"
+#include "WebPage.h"
+#include <WebCore/Page.h>
+
 #define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
 #include "NotImplemented.h"
 
@@ -39,7 +44,12 @@ void WebInspectorClient::inspectorDestroyed()
 
 void WebInspectorClient::openInspectorFrontend(InspectorController*)
 {
-    notImplemented();
+    WebPage* inspectorPage = m_page->inspector()->createInspectorPage();
+    ASSERT(inspectorPage);
+    if (!inspectorPage)
+        return;
+
+    inspectorPage->corePage()->inspectorController()->setInspectorFrontendClient(adoptPtr(new WebInspectorFrontendClient(m_page, inspectorPage)));
 }
 
 void WebInspectorClient::highlight(Node*)
@@ -62,10 +72,9 @@ void WebInspectorClient::storeSetting(const String&, const String&)
     notImplemented();
 }
 
-bool WebInspectorClient::sendMessageToFrontend(const String&)
+bool WebInspectorClient::sendMessageToFrontend(const String& message)
 {
-    notImplemented();
-    return false;
+    return doDispatchMessageOnFrontendPage(m_page->inspector()->inspectorPage()->corePage(), message);
 }
 
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
index f731f55..c44d8e4 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
@@ -25,6 +25,7 @@
 
 #include "WebInspectorFrontendClient.h"
 
+#include "WebInspector.h"
 #include "WebPage.h"
 #include <WebCore/Page.h>
 #include <wtf/text/WTFString.h>
@@ -42,10 +43,16 @@ WebInspectorFrontendClient::WebInspectorFrontendClient(WebPage* page, WebPage* i
 {
 }
 
+void WebInspectorFrontendClient::frontendLoaded()
+{
+    InspectorFrontendClientLocal::frontendLoaded();
+
+    m_page->inspector()->didLoadInspectorPage();
+}
+
 String WebInspectorFrontendClient::localizedStringsURL()
 {
-    notImplemented();
-    return String();
+    return m_page->inspector()->localizedStringsURL();
 }
 
 String WebInspectorFrontendClient::hiddenPanels()
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h
index f29ee1c..6406a38 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h
+++ b/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h
@@ -37,6 +37,8 @@ public:
     WebInspectorFrontendClient(WebPage* page, WebPage* inspectorPage);
 
 private:
+    virtual void frontendLoaded();
+
     virtual String localizedStringsURL();
     virtual String hiddenPanels();
 
diff --git a/WebKit2/WebProcess/WebPage/WebInspector.cpp b/WebKit2/WebProcess/WebPage/WebInspector.cpp
index c97ae08..028de08 100644
--- a/WebKit2/WebProcess/WebPage/WebInspector.cpp
+++ b/WebKit2/WebProcess/WebPage/WebInspector.cpp
@@ -25,7 +25,10 @@
 
 #include "WebInspector.h"
 
+#include "WebInspectorProxyMessages.h"
 #include "WebPage.h"
+#include "WebPageCreationParameters.h"
+#include "WebProcess.h"
 #include <WebCore/InspectorController.h>
 #include <WebCore/Page.h>
 
@@ -35,9 +38,41 @@ namespace WebKit {
 
 WebInspector::WebInspector(WebPage* page)
     : m_page(page)
+    , m_inspectorPage(0)
 {
 }
 
+// Called from WebInspectorClient
+WebPage* WebInspector::createInspectorPage()
+{
+    if (!m_page)
+        return 0;
+
+    uint64_t inspectorPageID = 0;
+    WebPageCreationParameters parameters;
+
+    if (!WebProcess::shared().connection()->sendSync(Messages::WebInspectorProxy::CreateInspectorPage(),
+            Messages::WebInspectorProxy::CreateInspectorPage::Reply(inspectorPageID, parameters),
+            m_page->pageID(), CoreIPC::Connection::NoTimeout)) {
+        return 0;
+    }
+
+    if (!inspectorPageID)
+        return 0;
+
+    WebProcess::shared().createWebPage(inspectorPageID, parameters);
+    m_inspectorPage = WebProcess::shared().webPage(inspectorPageID);
+    ASSERT(m_inspectorPage);
+
+    return m_inspectorPage;
+}
+
+// Called from WebInspectorFrontendClient
+void WebInspector::didLoadInspectorPage()
+{
+    WebProcess::shared().connection()->send(Messages::WebInspectorProxy::DidLoadInspectorPage(), m_page->pageID());
+}
+
 // Called by WebInspector messages
 void WebInspector::show()
 {
diff --git a/WebKit2/WebProcess/WebPage/WebInspector.h b/WebKit2/WebProcess/WebPage/WebInspector.h
index ff99853..967ef12 100644
--- a/WebKit2/WebProcess/WebPage/WebInspector.h
+++ b/WebKit2/WebProcess/WebPage/WebInspector.h
@@ -33,6 +33,7 @@
 namespace WebKit {
 
 class WebPage;
+class WebPageCreationParameters;
 
 class WebInspector {
     WTF_MAKE_NONCOPYABLE(WebInspector);
@@ -41,11 +42,24 @@ public:
     explicit WebInspector(WebPage*);
 
     WebPage* page() const { return m_page; }
+    WebPage* inspectorPage() const { return m_inspectorPage; }
 
     // Implemented in generated WebInspectorMessageReceiver.cpp
     void didReceiveWebInspectorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 
 private:
+    friend class WebInspectorClient;
+    friend class WebInspectorFrontendClient;
+
+    // Called from WebInspectorClient
+    WebPage* createInspectorPage();
+
+    // Called from WebInspectorFrontendClient
+    void didLoadInspectorPage();
+
+    // Implemented in platform WebInspector file
+    String localizedStringsURL() const;
+
     // Called by WebInspector messages
     void show();
     void close();
@@ -62,6 +76,7 @@ private:
     void stopPageProfiling();
 
     WebPage* m_page;
+    WebPage* m_inspectorPage;
 };
 
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 56b708b..2004cc9 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -1014,6 +1014,12 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
         return;
     }
 
+    if (messageID.is<CoreIPC::MessageClassWebInspector>()) {
+        if (WebInspector* inspector = this->inspector())
+            inspector->didReceiveWebInspectorMessage(connection, messageID, arguments);
+        return;
+    }
+
     didReceiveWebPageMessage(connection, messageID, arguments);
 }
 
diff --git a/WebKit2/WebProcess/WebPage/mac/WebInspectorMac.mm b/WebKit2/WebProcess/WebPage/mac/WebInspectorMac.mm
new file mode 100644
index 0000000..83909be
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/mac/WebInspectorMac.mm
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#import "WebInspector.h"
+
+#import <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+String WebInspector::localizedStringsURL() const
+{
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"localizedStrings" ofType:@"js"];
+    if (path)
+        return [[NSURL fileURLWithPath:path] absoluteString];
+    return String();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp b/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp
new file mode 100644
index 0000000..db5ef82
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#import "WebInspector.h"
+
+#import <wtf/text/WTFString.h>
+
+#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
+#include "NotImplemented.h"
+
+namespace WebKit {
+
+String WebInspector::localizedStringsURL() const
+{
+    notImplemented();
+    return String();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp b/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp
new file mode 100644
index 0000000..db5ef82
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#import "WebInspector.h"
+
+#import <wtf/text/WTFString.h>
+
+#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1
+#include "NotImplemented.h"
+
+namespace WebKit {
+
+String WebInspector::localizedStringsURL() const
+{
+    notImplemented();
+    return String();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index aaf5b43..baba0b6 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1271,6 +1271,10 @@
 						>
 					</File>
 					<File
+						RelativePath="..\WebProcess\WebPage\win\WebInspectorWin.cpp"
+						>
+					</File>
+					<File
 						RelativePath="..\WebProcess\WebPage\win\WebPageWin.cpp"
 						>
 					</File>
@@ -2180,6 +2184,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\UIProcess\win\WebInspectorProxyWin.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\UIProcess\win\WebPopupMenuProxyWin.cpp"
 					>
 				</File>
@@ -2513,6 +2521,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebInspectorProxyMessageReceiver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebInspectorProxyMessages.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
 				>
 			</File>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list