[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

ukai at chromium.org ukai at chromium.org
Thu Oct 29 20:35:34 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 5861260a99fda012f956c2d9c3584726fd735401
Author: ukai at chromium.org <ukai at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 29 05:42:58 2009 +0000

    2009-09-11  Fumitoshi Ukai  <ukai at chromium.org>
    
            Reviewed by Adam Barth.
    
            Add platform code to support WebSocket for chromium.
            https://bugs.webkit.org/show_bug.cgi?id=29171
    
            To build within chromium tree, it requires a patch in bug 29174.
            Real implementation will be landed in chromium tree.
    
            * WebCore.gypi:
            * platform/network/chromium/SocketStreamError.h: Added.
            (WebCore::SocketStreamError::SocketStreamError):
            * platform/network/chromium/SocketStreamHandle.h: Added.
            (WebCore::SocketStreamHandle::create):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 790df0b..5a7e8f9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-09-11  Fumitoshi Ukai  <ukai at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Add platform code to support WebSocket for chromium.
+        https://bugs.webkit.org/show_bug.cgi?id=29171
+
+        To build within chromium tree, it requires a patch in bug 29174.
+        Real implementation will be landed in chromium tree.
+
+        * WebCore.gypi:
+        * platform/network/chromium/SocketStreamError.h: Added.
+        (WebCore::SocketStreamError::SocketStreamError):
+        * platform/network/chromium/SocketStreamHandle.h: Added.
+        (WebCore::SocketStreamHandle::create):
+
 2009-09-28  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 6d03260..a4e8666 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -352,6 +352,7 @@
             'svg/SVGViewSpec.idl',
             'svg/SVGZoomAndPan.idl',
             'svg/SVGZoomEvent.idl',
+            'websockets/WebSocket.idl',
             'workers/AbstractWorker.idl',
             'workers/DedicatedWorkerContext.idl',
             'workers/SharedWorker.idl',
@@ -569,6 +570,9 @@
             'bindings/js/JSWebKitCSSMatrixConstructor.h',
             'bindings/js/JSWebKitPointConstructor.cpp',
             'bindings/js/JSWebKitPointConstructor.h',
+            'bindings/js/JSWebSocketConstructor.cpp',
+            'bindings/js/JSWebSocketConsuructor.h',
+            'bindings/js/JSWebSocketCustom.cpp',
             'bindings/js/JSWorkerConstructor.cpp',
             'bindings/js/JSWorkerConstructor.h',
             'bindings/js/JSWorkerContextBase.cpp',
@@ -707,6 +711,7 @@
             'bindings/v8/custom/V8TreeWalkerCustom.cpp',
             'bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp',
             'bindings/v8/custom/V8WebKitPointConstructor.cpp',
+            'bindings/v8/custom/V8WebSocketCustom.cpp',
             'bindings/v8/custom/V8WorkerContextCustom.cpp',
             'bindings/v8/custom/V8WorkerCustom.cpp',
             'bindings/v8/custom/V8XMLHttpRequestConstructor.cpp',
@@ -2337,6 +2342,9 @@
             'platform/network/cf/ResourceResponse.h',
             'platform/network/cf/ResourceResponseCFNet.cpp',
             'platform/network/cf/ResourceResponseCFNet.h',
+            'platform/network/cf/SocketStreamError.h',
+            'platform/network/cf/SocketStreamHandle.h',
+            'platform/network/cf/SocketStreamHandleCFNet.cpp',
             'platform/network/chromium/AuthenticationChallenge.h',
             'platform/network/chromium/AuthenticationChallengeChromium.cpp',
             'platform/network/chromium/CookieJarChromium.cpp',
@@ -2346,6 +2354,8 @@
             'platform/network/chromium/ResourceError.h',
             'platform/network/chromium/ResourceRequest.h',
             'platform/network/chromium/ResourceResponse.h',
+            'platform/network/chromium/SocketStreamError.h',
+            'platform/network/chromium/SocketStreamHandle.h',
             'platform/network/curl/AuthenticationChallenge.h',
             'platform/network/curl/CookieJarCurl.cpp',
             'platform/network/curl/DNSCurl.cpp',
@@ -2388,6 +2398,9 @@
             'platform/network/soup/ResourceHandleSoup.cpp',
             'platform/network/soup/ResourceRequest.h',
             'platform/network/soup/ResourceResponse.h',
+            'platform/network/soup/SocketStreamError.h',
+            'platform/network/soup/SocketStreamHandle.h',
+            'platform/network/soup/SocketStreamHandleSoup.cpp',
             'platform/network/soup/webkit-soup-auth-dialog.c',
             'platform/network/soup/webkit-soup-auth-dialog.h',
             'platform/network/win/CookieJarCFNetWin.cpp',
@@ -2422,6 +2435,11 @@
             'platform/network/ResourceRequestBase.h',
             'platform/network/ResourceResponseBase.cpp',
             'platform/network/ResourceResponseBase.h',
+            'platform/network/SocketStreamErrorBase.cpp',
+            'platform/network/SocketStreamErrorBase.h',
+            'platform/network/SocketStreamHandleBase.cpp',
+            'platform/network/SocketStreamHandleBase.h',
+            'platform/network/SocketStreamHandleClient.h',
             'platform/posix/FileSystemPOSIX.cpp',
             'platform/qt/ClipboardQt.cpp',
             'platform/qt/ClipboardQt.h',
@@ -3436,6 +3454,13 @@
             'svg/SVGZoomEvent.cpp',
             'svg/SVGZoomEvent.h',
             'svg/SynchronizableTypeWrapper.h',
+            'websockets/WebSocket.cpp',
+            'websockets/WebSocket.h',
+            'websockets/WebSocketChannel.cpp',
+            'websockets/WebSocketChannel.h',
+            'websockets/WebSocketChannelClient.h',
+            'websockets/WebSocketHandshake.cpp',
+            'websockets/WebSocketHandshake.h',
             'workers/AbstractWorker.cpp',
             'workers/AbstractWorker.h',
             'workers/DedicatedWorkerContext.cpp',
diff --git a/WebCore/platform/network/chromium/SocketStreamError.h b/WebCore/platform/network/chromium/SocketStreamError.h
new file mode 100644
index 0000000..540496b
--- /dev/null
+++ b/WebCore/platform/network/chromium/SocketStreamError.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 SocketStreamError_h
+#define SocketStreamError_h
+
+#include "SocketStreamErrorBase.h"
+
+namespace WebCore {
+
+class SocketStreamError : public SocketStreamErrorBase {
+public:
+    SocketStreamError() { }
+    explicit SocketStreamError(int errorCode)
+            : SocketStreamErrorBase(errorCode) { }
+};
+
+}  // namespace WebCore
+
+#endif  // SocketStreamError_h
diff --git a/WebCore/platform/network/chromium/SocketStreamHandle.h b/WebCore/platform/network/chromium/SocketStreamHandle.h
new file mode 100644
index 0000000..5a905cb
--- /dev/null
+++ b/WebCore/platform/network/chromium/SocketStreamHandle.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 SocketStreamHandle_h
+#define SocketStreamHandle_h
+
+#include "SocketStreamHandleBase.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+    class AuthenticationChallenge;
+    class Credential;
+    class SocketStreamHandleClient;
+    class SocketStreamHandleInternal;
+
+    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
+    public:
+        static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
+
+        virtual ~SocketStreamHandle();
+
+    protected:
+        virtual int platformSend(const char* data, int length);
+        virtual void platformClose();
+
+    private:
+        SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
+
+        // No authentication for streams per se, but proxy may ask for credentials.
+        void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
+        void receivedCredential(const AuthenticationChallenge&, const Credential&);
+        void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
+        void receivedCancellation(const AuthenticationChallenge&);
+
+        friend class SocketStreamHandleInternal;
+        OwnPtr<SocketStreamHandleInternal> m_internal;
+    };
+
+}  // namespace WebCore
+
+#endif  // SocketStreamHandle_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list