Commit c8889f09 authored by andersca@apple.com's avatar andersca@apple.com

Remove WebSocketHandshakeResponse class

https://bugs.webkit.org/show_bug.cgi?id=116190

Reviewed by Andreas Kling.

Just use ResourceResponse instead of WebSocketHandshakeResponse.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::serverWebSocketProtocol):
(WebCore::WebSocketHandshake::serverSetCookie):
(WebCore::WebSocketHandshake::serverSetCookie2):
(WebCore::WebSocketHandshake::serverUpgrade):
(WebCore::WebSocketHandshake::serverConnection):
(WebCore::WebSocketHandshake::serverWebSocketAccept):
(WebCore::WebSocketHandshake::serverHandshakeResponse):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
* Modules/websockets/WebSocketHandshakeResponse.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2efc3ed5
......@@ -963,7 +963,6 @@ set(WebCore_SOURCES
Modules/websockets/WebSocketExtensionParser.cpp
Modules/websockets/WebSocketFrame.cpp
Modules/websockets/WebSocketHandshake.cpp
Modules/websockets/WebSocketHandshakeResponse.cpp
Modules/websockets/WorkerThreadableWebSocketChannel.cpp
accessibility/AXObjectCache.cpp
......
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeResponse class
https://bugs.webkit.org/show_bug.cgi?id=116190
Reviewed by Andreas Kling.
Just use ResourceResponse instead of WebSocketHandshakeResponse.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::serverWebSocketProtocol):
(WebCore::WebSocketHandshake::serverSetCookie):
(WebCore::WebSocketHandshake::serverSetCookie2):
(WebCore::WebSocketHandshake::serverUpgrade):
(WebCore::WebSocketHandshake::serverConnection):
(WebCore::WebSocketHandshake::serverWebSocketAccept):
(WebCore::WebSocketHandshake::serverHandshakeResponse):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
* Modules/websockets/WebSocketHandshakeResponse.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
2013-05-15 Eric Carlson <eric.carlson@apple.com>
[Mac] media engine may deliver NULL in-band "cue"
......
......@@ -2259,8 +2259,6 @@ webcore_modules_sources += \
Source/WebCore/Modules/websockets/WebSocketFrame.h \
Source/WebCore/Modules/websockets/WebSocketHandshake.cpp \
Source/WebCore/Modules/websockets/WebSocketHandshake.h \
Source/WebCore/Modules/websockets/WebSocketHandshakeResponse.cpp \
Source/WebCore/Modules/websockets/WebSocketHandshakeResponse.h \
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp \
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h
......
......@@ -299,8 +299,11 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
return len;
}
LOG(Network, "WebSocketHandshake %p readServerHandshake() Status code is %d", this, statusCode);
m_response.setStatusCode(statusCode);
m_response.setStatusText(statusText);
m_serverHandshakeResponse = ResourceResponse();
m_serverHandshakeResponse.setHTTPStatusCode(statusCode);
m_serverHandshakeResponse.setHTTPStatusText(statusText);
if (statusCode != 101) {
m_mode = Failed;
m_failureReason = "Unexpected response code: " + String::number(statusCode);
......@@ -340,32 +343,32 @@ String WebSocketHandshake::failureReason() const
String WebSocketHandshake::serverWebSocketProtocol() const
{
return m_response.headerFields().get("sec-websocket-protocol");
return m_serverHandshakeResponse.httpHeaderFields().get("sec-websocket-protocol");
}
String WebSocketHandshake::serverSetCookie() const
{
return m_response.headerFields().get("set-cookie");
return m_serverHandshakeResponse.httpHeaderFields().get("set-cookie");
}
String WebSocketHandshake::serverSetCookie2() const
{
return m_response.headerFields().get("set-cookie2");
return m_serverHandshakeResponse.httpHeaderFields().get("set-cookie2");
}
String WebSocketHandshake::serverUpgrade() const
{
return m_response.headerFields().get("upgrade");
return m_serverHandshakeResponse.httpHeaderFields().get("upgrade");
}
String WebSocketHandshake::serverConnection() const
{
return m_response.headerFields().get("connection");
return m_serverHandshakeResponse.httpHeaderFields().get("connection");
}
String WebSocketHandshake::serverWebSocketAccept() const
{
return m_response.headerFields().get("sec-websocket-accept");
return m_serverHandshakeResponse.httpHeaderFields().get("sec-websocket-accept");
}
String WebSocketHandshake::acceptedExtensions() const
......@@ -373,9 +376,9 @@ String WebSocketHandshake::acceptedExtensions() const
return m_extensionDispatcher.acceptedExtensions();
}
const WebSocketHandshakeResponse& WebSocketHandshake::serverHandshakeResponse() const
const ResourceResponse& WebSocketHandshake::serverHandshakeResponse() const
{
return m_response;
return m_serverHandshakeResponse;
}
void WebSocketHandshake::addExtensionProcessor(PassOwnPtr<WebSocketExtensionProcessor> processor)
......@@ -463,8 +466,6 @@ int WebSocketHandshake::readStatusLine(const char* header, size_t headerLength,
const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* end)
{
m_response.clearHeaderFields();
AtomicString name;
String value;
bool sawSecWebSocketExtensionsHeaderField = false;
......@@ -496,17 +497,17 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
m_failureReason = "The Sec-WebSocket-Accept header MUST NOT appear more than once in an HTTP response";
return 0;
}
m_response.addHeaderField(name, value);
m_serverHandshakeResponse.addHTTPHeaderField(name, value);
sawSecWebSocketAcceptHeaderField = true;
} else if (equalIgnoringCase("Sec-WebSocket-Protocol", name)) {
if (sawSecWebSocketProtocolHeaderField) {
m_failureReason = "The Sec-WebSocket-Protocol header MUST NOT appear more than once in an HTTP response";
return 0;
}
m_response.addHeaderField(name, value);
m_serverHandshakeResponse.addHTTPHeaderField(name, value);
sawSecWebSocketProtocolHeaderField = true;
} else
m_response.addHeaderField(name, value);
m_serverHandshakeResponse.addHTTPHeaderField(name, value);
}
return p;
}
......
......@@ -34,9 +34,9 @@
#if ENABLE(WEB_SOCKETS)
#include "KURL.h"
#include "ResourceResponse.h"
#include "WebSocketExtensionDispatcher.h"
#include "WebSocketExtensionProcessor.h"
#include "WebSocketHandshakeResponse.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/text/WTFString.h>
......@@ -84,7 +84,7 @@ public:
String serverWebSocketAccept() const;
String acceptedExtensions() const;
const WebSocketHandshakeResponse& serverHandshakeResponse() const;
const ResourceResponse& serverHandshakeResponse() const;
void addExtensionProcessor(PassOwnPtr<WebSocketExtensionProcessor>);
......@@ -107,7 +107,7 @@ private:
Mode m_mode;
WebSocketHandshakeResponse m_response;
ResourceResponse m_serverHandshakeResponse;
String m_failureReason;
......
/*
* Copyright (C) 2010 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.
*/
#include "config.h"
#if ENABLE(WEB_SOCKETS)
#include "WebSocketHandshakeResponse.h"
#include <wtf/Assertions.h>
#include <wtf/text/AtomicString.h>
using namespace std;
namespace WebCore {
WebSocketHandshakeResponse::WebSocketHandshakeResponse()
{
}
WebSocketHandshakeResponse::~WebSocketHandshakeResponse()
{
}
int WebSocketHandshakeResponse::statusCode() const
{
return m_statusCode;
}
void WebSocketHandshakeResponse::setStatusCode(int statusCode)
{
ASSERT(statusCode >= 100 && statusCode < 600);
m_statusCode = statusCode;
}
const String& WebSocketHandshakeResponse::statusText() const
{
return m_statusText;
}
void WebSocketHandshakeResponse::setStatusText(const String& statusText)
{
m_statusText = statusText;
}
const HTTPHeaderMap& WebSocketHandshakeResponse::headerFields() const
{
return m_headerFields;
}
void WebSocketHandshakeResponse::addHeaderField(const AtomicString& name, const String& value)
{
m_headerFields.add(name, value);
}
void WebSocketHandshakeResponse::clearHeaderFields()
{
m_headerFields.clear();
}
} // namespace WebCore
#endif // ENABLE(WEB_SOCKETS)
/*
* Copyright (C) 2010 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 WebSocketHandshakeResponse_h
#define WebSocketHandshakeResponse_h
#if ENABLE(WEB_SOCKETS)
#include "HTTPHeaderMap.h"
#include <wtf/Forward.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class WebSocketHandshakeResponse {
public:
WebSocketHandshakeResponse();
~WebSocketHandshakeResponse();
int statusCode() const;
void setStatusCode(int statusCode);
const String& statusText() const;
void setStatusText(const String& statusText);
const HTTPHeaderMap& headerFields() const;
void addHeaderField(const AtomicString& name, const String& value);
void clearHeaderFields();
private:
int m_statusCode;
String m_statusText;
HTTPHeaderMap m_headerFields;
};
} // namespace WebCore
#endif // ENABLE(WEB_SOCKETS)
#endif // WebSocketHandshakeResponse_h
......@@ -4024,7 +4024,6 @@ enable?(WEB_SOCKETS) {
Modules/websockets/WebSocketExtensionProcessor.h \
Modules/websockets/WebSocketFrame.h \
Modules/websockets/WebSocketHandshake.h \
Modules/websockets/WebSocketHandshakeResponse.h \
Modules/websockets/WorkerThreadableWebSocketChannel.h \
platform/network/qt/SocketStreamHandlePrivate.h
......@@ -4037,7 +4036,6 @@ enable?(WEB_SOCKETS) {
Modules/websockets/WebSocketExtensionParser.cpp \
Modules/websockets/WebSocketFrame.cpp \
Modules/websockets/WebSocketHandshake.cpp \
Modules/websockets/WebSocketHandshakeResponse.cpp \
Modules/websockets/WorkerThreadableWebSocketChannel.cpp \
Modules/websockets/ThreadableWebSocketChannel.cpp \
Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp \
......
......@@ -25909,14 +25909,6 @@
RelativePath="..\Modules\websockets\WebSocketHandshake.h"
>
</File>
<File
RelativePath="..\Modules\websockets\WebSocketHandshakeResponse.cpp"
>
</File>
<File
RelativePath="..\Modules\websockets\WebSocketHandshakeResponse.h"
>
</File>
<File
RelativePath="..\Modules\websockets\WorkerThreadableWebSocketChannel.cpp"
>
......@@ -3710,7 +3710,6 @@
<ClCompile Include="..\Modules\websockets\WebSocketExtensionParser.cpp" />
<ClCompile Include="..\Modules\websockets\WebSocketFrame.cpp" />
<ClCompile Include="..\Modules\websockets\WebSocketHandshake.cpp" />
<ClCompile Include="..\Modules\websockets\WebSocketHandshakeResponse.cpp" />
<ClCompile Include="..\Modules\websockets\WorkerThreadableWebSocketChannel.cpp" />
<ClCompile Include="..\Modules\speech\DOMWindowSpeechSynthesis.cpp" />
<ClCompile Include="..\Modules\speech\SpeechSynthesis.cpp" />
......@@ -588,9 +588,6 @@
<ClCompile Include="..\Modules\websockets\WebSocketHandshake.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
<ClCompile Include="..\Modules\websockets\WebSocketHandshakeResponse.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
<ClCompile Include="..\Modules\websockets\WorkerThreadableWebSocketChannel.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
......@@ -7281,9 +7278,6 @@
<ClInclude Include="..\Modules\websockets\WebSocketHandshake.h">
<Filter>Modules\websockets</Filter>
</ClInclude>
<ClInclude Include="..\Modules\websockets\WebSocketHandshakeResponse.h">
<Filter>Modules\websockets</Filter>
</ClInclude>
<ClInclude Include="..\Modules\websockets\WorkerThreadableWebSocketChannel.h">
<Filter>Modules\websockets</Filter>
</ClInclude>
......
......@@ -3197,8 +3197,6 @@
97AABD2514FA09D5007457AE /* WebSocketFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AABD0A14FA09D5007457AE /* WebSocketFrame.h */; };
97AABD2614FA09D5007457AE /* WebSocketHandshake.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97AABD0B14FA09D5007457AE /* WebSocketHandshake.cpp */; };
97AABD2714FA09D5007457AE /* WebSocketHandshake.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AABD0C14FA09D5007457AE /* WebSocketHandshake.h */; };
97AABD2A14FA09D5007457AE /* WebSocketHandshakeResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97AABD0F14FA09D5007457AE /* WebSocketHandshakeResponse.cpp */; };
97AABD2B14FA09D5007457AE /* WebSocketHandshakeResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AABD1014FA09D5007457AE /* WebSocketHandshakeResponse.h */; };
97AABD2C14FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */; };
97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AABD1214FA09D5007457AE /* WorkerThreadableWebSocketChannel.h */; };
97B1F02E13B025CA00F5103F /* SharedBufferChunkReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37569E0013AF172C00CDBA8E /* SharedBufferChunkReader.cpp */; };
......@@ -9655,8 +9653,6 @@
97AABD0A14FA09D5007457AE /* WebSocketFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketFrame.h; path = Modules/websockets/WebSocketFrame.h; sourceTree = "<group>"; };
97AABD0B14FA09D5007457AE /* WebSocketHandshake.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSocketHandshake.cpp; path = Modules/websockets/WebSocketHandshake.cpp; sourceTree = "<group>"; };
97AABD0C14FA09D5007457AE /* WebSocketHandshake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketHandshake.h; path = Modules/websockets/WebSocketHandshake.h; sourceTree = "<group>"; };
97AABD0F14FA09D5007457AE /* WebSocketHandshakeResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSocketHandshakeResponse.cpp; path = Modules/websockets/WebSocketHandshakeResponse.cpp; sourceTree = "<group>"; };
97AABD1014FA09D5007457AE /* WebSocketHandshakeResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketHandshakeResponse.h; path = Modules/websockets/WebSocketHandshakeResponse.h; sourceTree = "<group>"; };
97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerThreadableWebSocketChannel.cpp; path = Modules/websockets/WorkerThreadableWebSocketChannel.cpp; sourceTree = "<group>"; };
97AABD1214FA09D5007457AE /* WorkerThreadableWebSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerThreadableWebSocketChannel.h; path = Modules/websockets/WorkerThreadableWebSocketChannel.h; sourceTree = "<group>"; };
97B38E23151C4264004622E9 /* DOMWindowNotifications.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMWindowNotifications.cpp; path = Modules/notifications/DOMWindowNotifications.cpp; sourceTree = "<group>"; };
......@@ -16401,8 +16397,6 @@
97AABD0A14FA09D5007457AE /* WebSocketFrame.h */,
97AABD0B14FA09D5007457AE /* WebSocketHandshake.cpp */,
97AABD0C14FA09D5007457AE /* WebSocketHandshake.h */,
97AABD0F14FA09D5007457AE /* WebSocketHandshakeResponse.cpp */,
97AABD1014FA09D5007457AE /* WebSocketHandshakeResponse.h */,
A886CDC214FBBAA300D279F4 /* WorkerContextWebSocket.idl */,
97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */,
97AABD1214FA09D5007457AE /* WorkerThreadableWebSocketChannel.h */,
......@@ -23990,7 +23984,6 @@
97AABD2414FA09D5007457AE /* WebSocketExtensionProcessor.h in Headers */,
97AABD2514FA09D5007457AE /* WebSocketFrame.h in Headers */,
97AABD2714FA09D5007457AE /* WebSocketHandshake.h in Headers */,
97AABD2B14FA09D5007457AE /* WebSocketHandshakeResponse.h in Headers */,
0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */,
0FCF332D0F2B9A25004B6795 /* WebTiledLayer.h in Headers */,
1AC2D845171734A100652FC0 /* Storage.h in Headers */,
......@@ -26975,7 +26968,6 @@
4A5A2ADB161E7E00005889DD /* WebSocketExtensionParser.cpp in Sources */,
AAF5B7B71524B6C50004CB49 /* WebSocketFrame.cpp in Sources */,
97AABD2614FA09D5007457AE /* WebSocketHandshake.cpp in Sources */,
97AABD2A14FA09D5007457AE /* WebSocketHandshakeResponse.cpp in Sources */,
0F580FA41496939100FB5BD8 /* WebTiledBackingLayer.mm in Sources */,
0FCF332C0F2B9A25004B6795 /* WebTiledLayer.mm in Sources */,
1AA7161E149BF2FA0016EC19 /* WebTileLayer.mm in Sources */,
......@@ -1168,7 +1168,7 @@ void InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl(Instrumenti
timelineAgent->willSendWebSocketHandshakeRequest(identifier, document->frame());
}
void InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const WebSocketHandshakeResponse& response, Document* document)
void InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const ResourceResponse& response, Document* document)
{
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->didReceiveWebSocketHandshakeResponse(identifier, response);
......
......@@ -44,7 +44,6 @@
#include "ScriptState.h"
#include "StorageArea.h"
#include "WebSocketFrame.h"
#include "WebSocketHandshakeResponse.h"
#include <wtf/RefPtr.h>
namespace WebCore {
......@@ -270,7 +269,7 @@ public:
#if ENABLE(WEB_SOCKETS)
static void didCreateWebSocket(Document*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL, const String& protocol);
static void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const ResourceRequest&);
static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const WebSocketHandshakeResponse&);
static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const ResourceResponse&);
static void didCloseWebSocket(Document*, unsigned long identifier);
static void didReceiveWebSocketFrame(Document*, unsigned long identifier, const WebSocketFrame&);
static void didSendWebSocketFrame(Document*, unsigned long identifier, const WebSocketFrame&);
......@@ -469,7 +468,7 @@ private:
#if ENABLE(WEB_SOCKETS)
static void didCreateWebSocketImpl(InstrumentingAgents*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL, const String& protocol, Document*);
static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents*, unsigned long identifier, const ResourceRequest&, Document*);
static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketHandshakeResponse&, Document*);
static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const ResourceResponse&, Document*);
static void didCloseWebSocketImpl(InstrumentingAgents*, unsigned long identifier, Document*);
static void didReceiveWebSocketFrameImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketFrame&);
static void didSendWebSocketFrameImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketFrame&);
......@@ -1859,7 +1858,7 @@ inline void InspectorInstrumentation::willSendWebSocketHandshakeRequest(Document
#endif
}
inline void InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(Document* document, unsigned long identifier, const WebSocketHandshakeResponse& response)
inline void InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(Document* document, unsigned long identifier, const ResourceResponse& response)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
......
......@@ -67,7 +67,6 @@
#include "Settings.h"
#include "SubresourceLoader.h"
#include "WebSocketFrame.h"
#include "WebSocketHandshakeResponse.h"
#include "XMLHttpRequest.h"
#include <wtf/CurrentTime.h>
......@@ -493,12 +492,12 @@ void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long ide
m_frontend->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(identifier), currentTime(), requestObject);
}
void InspectorResourceAgent::didReceiveWebSocketHandshakeResponse(unsigned long identifier, const WebSocketHandshakeResponse& response)
void InspectorResourceAgent::didReceiveWebSocketHandshakeResponse(unsigned long identifier, const ResourceResponse& response)
{
RefPtr<TypeBuilder::Network::WebSocketResponse> responseObject = TypeBuilder::Network::WebSocketResponse::create()
.setStatus(response.statusCode())
.setStatusText(response.statusText())
.setHeaders(buildObjectForHeaders(response.headerFields()));
.setStatus(response.httpStatusCode())
.setStatusText(response.httpStatusText())
.setHeaders(buildObjectForHeaders(response.httpHeaderFields()));
m_frontend->webSocketHandshakeResponseReceived(IdentifiersFactory::requestId(identifier), currentTime(), responseObject);
}
......
......@@ -74,7 +74,6 @@ class XMLHttpRequest;
#if ENABLE(WEB_SOCKETS)
struct WebSocketFrame;
class WebSocketHandshakeResponse;
#endif
typedef String ErrorString;
......@@ -127,7 +126,7 @@ public:
#if ENABLE(WEB_SOCKETS)
void didCreateWebSocket(unsigned long identifier, const KURL& requestURL);
void willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest&);
void didReceiveWebSocketHandshakeResponse(unsigned long identifier, const WebSocketHandshakeResponse&);
void didReceiveWebSocketHandshakeResponse(unsigned long identifier, const ResourceResponse&);
void didCloseWebSocket(unsigned long identifier);
void didReceiveWebSocketFrame(unsigned long identifier, const WebSocketFrame&);
void didSendWebSocketFrame(unsigned long identifier, const WebSocketFrame&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment