Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2012 00:55:59 +0000 (00:55 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2012 00:55:59 +0000 (00:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79663

Reviewed by Adam Barth.

For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
to WorkerContextWebSocket.idl.

Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/websockets/WorkerContextWebSocket.idl: Added.
* WebCore.gypi:
* WebCore.xcodeproj/project.xcodeproj:
* workers/WorkerContext.idl:

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

Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl [new file with mode: 0644]
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/workers/WorkerContext.idl

index 58cf5e5..f56013e 100644 (file)
@@ -148,6 +148,7 @@ SET(WebCore_IDL_FILES
 
     Modules/websockets/CloseEvent.idl
     Modules/websockets/DOMWindowWebSocket.idl
+    Modules/websockets/WorkerContextWebSocket.idl
 
     css/Counter.idl
     css/CSSCharsetRule.idl
index 3fae9ee..af78dc6 100644 (file)
@@ -1,3 +1,24 @@
+2012-03-23  Kentaro Hara  <haraken@chromium.org>
+
+        Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
+        https://bugs.webkit.org/show_bug.cgi?id=79663
+
+        Reviewed by Adam Barth.
+
+        For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
+        to WorkerContextWebSocket.idl.
+
+        Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * Modules/websockets/WorkerContextWebSocket.idl: Added.
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.xcodeproj:
+        * workers/WorkerContext.idl:
+
 2012-03-23  Parag Radke  <parag@motorola.com>
 
         REGRESSION: can select text of an input button
index 14cb29b..7fab7c5 100644 (file)
@@ -150,6 +150,7 @@ BINDING_IDLS = \
     $(WebCore)/Modules/websockets/CloseEvent.idl \
     $(WebCore)/Modules/websockets/DOMWindowWebSocket.idl \
     $(WebCore)/Modules/websockets/WebSocket.idl \
+    $(WebCore)/Modules/websockets/WorkerContextWebSocket.idl \
     $(WebCore)/css/CSSCharsetRule.idl \
     $(WebCore)/css/CSSFontFaceRule.idl \
     $(WebCore)/css/CSSImportRule.idl \
index 3cf2069..b368a13 100644 (file)
@@ -169,6 +169,7 @@ IDL_BINDINGS += \
     $$PWD/Modules/websockets/CloseEvent.idl \
     $$PWD/Modules/websockets/DOMWindowWebSocket.idl \
     $$PWD/Modules/websockets/WebSocket.idl \
+    $$PWD/Modules/websockets/WorkerContextWebSocket.idl \
     $$PWD/css/Counter.idl \
     $$PWD/css/CSSCharsetRule.idl \
     $$PWD/css/CSSFontFaceRule.idl \
index e5d07c0..5718f82 100644 (file)
@@ -5636,7 +5636,8 @@ webcore_built_sources += \
 dom_binding_idls += \
        $(WebCore)/Modules/websockets/CloseEvent.idl \
        $(WebCore)/Modules/websockets/DOMWindowWebSocket.idl \
-       $(WebCore)/Modules/websockets/WebSocket.idl
+       $(WebCore)/Modules/websockets/WebSocket.idl \
+       $(WebCore)/Modules/websockets/WorkerContextWebSocket.idl
 endif  # END ENABLE_WEB_SOCKETS
 
 # ---
diff --git a/Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl b/Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl
new file mode 100644 (file)
index 0000000..9cd2524
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008 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 COMPUTER, INC. ``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 COMPUTER, INC. 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. 
+ *
+ */
+
+module window {
+
+    interface [
+        Conditional=WEB_SOCKETS,
+        Supplemental=WorkerContext
+    ] WorkerContextWebSocket {
+        attribute [JSCustomGetter,V8EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
+    };
+
+}
index c40f122..63e9080 100644 (file)
             'Modules/websockets/CloseEvent.idl',
             'Modules/websockets/DOMWindowWebSocket.idl',
             'Modules/websockets/WebSocket.idl',
+            'Modules/websockets/WorkerContextWebSocket.idl',
             'css/CSSCharsetRule.idl',
             'css/CSSFontFaceRule.idl',
             'css/CSSImportRule.idl',
index 3107b8a..e86b0e0 100644 (file)
                A8748BDF12CBF2DC001FBA41 /* HashTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashTools.h; sourceTree = "<group>"; };
                A883DF250F3D045D00F19BF6 /* VisibleSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisibleSelection.cpp; sourceTree = "<group>"; };
                A883DF260F3D045D00F19BF6 /* VisibleSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisibleSelection.h; sourceTree = "<group>"; };
+               A886CDC214FBBAA300D279F4 /* WorkerContextWebSocket.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WorkerContextWebSocket.idl; path = Modules/websockets/WorkerContextWebSocket.idl; sourceTree = "<group>"; };
                A88DD4860B4629A300C02990 /* PathTraversalState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathTraversalState.h; sourceTree = "<group>"; };
                A88DD4880B4629B000C02990 /* PathTraversalState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathTraversalState.cpp; sourceTree = "<group>"; };
                A89943260B42338700D7C802 /* BitmapImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitmapImage.h; sourceTree = "<group>"; };
                                97AABD0E14FA09D5007457AE /* WebSocketHandshakeRequest.h */,
                                97AABD0F14FA09D5007457AE /* WebSocketHandshakeResponse.cpp */,
                                97AABD1014FA09D5007457AE /* WebSocketHandshakeResponse.h */,
+                               A886CDC214FBBAA300D279F4 /* WorkerContextWebSocket.idl */,
                                97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */,
                                97AABD1214FA09D5007457AE /* WorkerThreadableWebSocketChannel.h */,
                        );
index f88b948..491f5f5 100644 (file)
@@ -85,9 +85,6 @@ module threads {
 #endif
         attribute [JSCustomGetter] EventSourceConstructor EventSource;
         attribute [JSCustomGetter] XMLHttpRequestConstructor XMLHttpRequest;
-#if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
-        attribute [JSCustomGetter,V8EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
-#endif
 #endif
 
 #if defined(ENABLE_BLOB) && ENABLE_BLOB