Commit 5e670f60 authored by andersca@apple.com's avatar andersca@apple.com

Remove WebSocketHandshakeRequest class

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

Reviewed by Andreas Kling.

Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeRequest):
* Modules/websockets/WebSocketHandshake.h:
(WebCore):
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.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::willSendWebSocketHandshakeRequestImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* platform/network/HTTPRequest.cpp:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 656c687a
......@@ -963,7 +963,6 @@ set(WebCore_SOURCES
Modules/websockets/WebSocketExtensionParser.cpp
Modules/websockets/WebSocketFrame.cpp
Modules/websockets/WebSocketHandshake.cpp
Modules/websockets/WebSocketHandshakeRequest.cpp
Modules/websockets/WebSocketHandshakeResponse.cpp
Modules/websockets/WorkerThreadableWebSocketChannel.cpp
......
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeRequest class
https://bugs.webkit.org/show_bug.cgi?id=116178
Reviewed by Andreas Kling.
Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeRequest):
* Modules/websockets/WebSocketHandshake.h:
(WebCore):
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.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::willSendWebSocketHandshakeRequestImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* platform/network/HTTPRequest.cpp:
(WebCore):
2013-05-15 Darin Adler <darin@apple.com>
Try to fix iOS build.
......
......@@ -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/WebSocketHandshakeRequest.cpp \
Source/WebCore/Modules/websockets/WebSocketHandshakeRequest.h \
Source/WebCore/Modules/websockets/WebSocketHandshakeResponse.cpp \
Source/WebCore/Modules/websockets/WebSocketHandshakeResponse.h \
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp \
......
......@@ -47,6 +47,7 @@
#include "Logging.h"
#include "Page.h"
#include "ProgressTracker.h"
#include "ResourceRequest.h"
#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "Settings.h"
......@@ -257,7 +258,7 @@ void WebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle)
if (!m_document)
return;
if (m_identifier)
InspectorInstrumentation::willSendWebSocketHandshakeRequest(m_document, m_identifier, *m_handshake->clientHandshakeRequest());
InspectorInstrumentation::willSendWebSocketHandshakeRequest(m_document, m_identifier, m_handshake->clientHandshakeRequest());
CString handshakeMessage = m_handshake->clientHandshakeMessage();
if (!handle->send(handshakeMessage.data(), handshakeMessage.length()))
fail("Failed to send WebSocket handshake.");
......
......@@ -43,6 +43,7 @@
#include "HTTPParsers.h"
#include "KURL.h"
#include "Logging.h"
#include "ResourceRequest.h"
#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
......@@ -236,41 +237,42 @@ CString WebSocketHandshake::clientHandshakeMessage() const
return builder.toString().utf8();
}
PassRefPtr<WebSocketHandshakeRequest> WebSocketHandshake::clientHandshakeRequest() const
ResourceRequest WebSocketHandshake::clientHandshakeRequest() const
{
// Keep the following consistent with clientHandshakeMessage().
// FIXME: do we need to store m_secWebSocketKey1, m_secWebSocketKey2 and
// m_key3 in WebSocketHandshakeRequest?
RefPtr<WebSocketHandshakeRequest> request = WebSocketHandshakeRequest::create("GET", m_url);
request->addHeaderField("Upgrade", "websocket");
request->addHeaderField("Connection", "Upgrade");
request->addHeaderField("Host", hostName(m_url, m_secure));
request->addHeaderField("Origin", clientOrigin());
// m_key3 in the request?
ResourceRequest request(m_url);
request.setHTTPMethod("GET");
request.addHTTPHeaderField("Connection", "Upgrade");
request.addHTTPHeaderField("Host", hostName(m_url, m_secure));
request.addHTTPHeaderField("Origin", clientOrigin());
if (!m_clientProtocol.isEmpty())
request->addHeaderField("Sec-WebSocket-Protocol", m_clientProtocol);
request.addHTTPHeaderField("Sec-WebSocket-Protocol", m_clientProtocol);
KURL url = httpURLForAuthenticationAndCookies();
if (m_context->isDocument()) {
Document* document = toDocument(m_context);
String cookie = cookieRequestHeaderFieldValue(document, url);
if (!cookie.isEmpty())
request->addHeaderField("Cookie", cookie);
request.addHTTPHeaderField("Cookie", cookie);
// Set "Cookie2: <cookie>" if cookies 2 exists for url?
}
request->addHeaderField("Pragma", "no-cache");
request->addHeaderField("Cache-Control", "no-cache");
request.addHTTPHeaderField("Pragma", "no-cache");
request.addHTTPHeaderField("Cache-Control", "no-cache");
request->addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
request->addHeaderField("Sec-WebSocket-Version", "13");
request.addHTTPHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
request.addHTTPHeaderField("Sec-WebSocket-Version", "13");
const String extensionValue = m_extensionDispatcher.createHeaderValue();
if (extensionValue.length())
request->addHeaderField("Sec-WebSocket-Extensions", extensionValue);
request.addHTTPHeaderField("Sec-WebSocket-Extensions", extensionValue);
// Add a User-Agent header.
request->addHeaderField("User-Agent", m_context->userAgent(m_context->url()));
request.addHTTPHeaderField("User-Agent", m_context->userAgent(m_context->url()));
return request.release();
return request;
}
void WebSocketHandshake::reset()
......
......@@ -36,13 +36,13 @@
#include "KURL.h"
#include "WebSocketExtensionDispatcher.h"
#include "WebSocketExtensionProcessor.h"
#include "WebSocketHandshakeRequest.h"
#include "WebSocketHandshakeResponse.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class ResourceRequest;
class ScriptExecutionContext;
class WebSocketHandshake {
......@@ -67,7 +67,7 @@ public:
String clientLocation() const;
CString clientHandshakeMessage() const;
PassRefPtr<WebSocketHandshakeRequest> clientHandshakeRequest() const;
ResourceRequest clientHandshakeRequest() const;
void reset();
void clearScriptExecutionContext();
......
/*
* 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 "WebSocketHandshakeRequest.h"
#include <cstring>
using namespace std;
namespace WebCore {
WebSocketHandshakeRequest::WebSocketHandshakeRequest(const String& requestMethod, const KURL& url)
: HTTPRequest(requestMethod, url, HTTP_1_1)
{
}
WebSocketHandshakeRequest::~WebSocketHandshakeRequest()
{
}
} // 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 WebSocketHandshakeRequest_h
#define WebSocketHandshakeRequest_h
#if ENABLE(WEB_SOCKETS)
#include "HTTPRequest.h"
namespace WebCore {
class WebSocketHandshakeRequest : public HTTPRequest {
public:
static PassRefPtr<WebSocketHandshakeRequest> create(const String& requestMethod, const KURL& url) { return adoptRef(new WebSocketHandshakeRequest(requestMethod, url)); }
~WebSocketHandshakeRequest();
private:
WebSocketHandshakeRequest(const String& requestMethod, const KURL&);
};
} // namespace WebCore
#endif // ENABLE(WEB_SOCKETS)
#endif // WebSocketHandshakeRequest_h
......@@ -4024,7 +4024,6 @@ enable?(WEB_SOCKETS) {
Modules/websockets/WebSocketExtensionProcessor.h \
Modules/websockets/WebSocketFrame.h \
Modules/websockets/WebSocketHandshake.h \
Modules/websockets/WebSocketHandshakeRequest.h \
Modules/websockets/WebSocketHandshakeResponse.h \
Modules/websockets/WorkerThreadableWebSocketChannel.h \
platform/network/qt/SocketStreamHandlePrivate.h
......@@ -4038,7 +4037,6 @@ enable?(WEB_SOCKETS) {
Modules/websockets/WebSocketExtensionParser.cpp \
Modules/websockets/WebSocketFrame.cpp \
Modules/websockets/WebSocketHandshake.cpp \
Modules/websockets/WebSocketHandshakeRequest.cpp \
Modules/websockets/WebSocketHandshakeResponse.cpp \
Modules/websockets/WorkerThreadableWebSocketChannel.cpp \
Modules/websockets/ThreadableWebSocketChannel.cpp \
......
......@@ -25909,14 +25909,6 @@
RelativePath="..\Modules\websockets\WebSocketHandshake.h"
>
</File>
<File
RelativePath="..\Modules\websockets\WebSocketHandshakeRequest.cpp"
>
</File>
<File
RelativePath="..\Modules\websockets\WebSocketHandshakeRequest.h"
>
</File>
<File
RelativePath="..\Modules\websockets\WebSocketHandshakeResponse.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\WebSocketHandshakeRequest.cpp" />
<ClCompile Include="..\Modules\websockets\WebSocketHandshakeResponse.cpp" />
<ClCompile Include="..\Modules\websockets\WorkerThreadableWebSocketChannel.cpp" />
<ClCompile Include="..\Modules\speech\DOMWindowSpeechSynthesis.cpp" />
......@@ -11308,8 +11307,6 @@
<ClInclude Include="..\Modules\websockets\WebSocketExtensionProcessor.h" />
<ClInclude Include="..\Modules\websockets\WebSocketFrame.h" />
<ClInclude Include="..\Modules\websockets\WebSocketHandshake.h" />
<ClInclude Include="..\Modules\websockets\WebSocketHandshakeRequest.h" />
<ClInclude Include="..\Modules\websockets\WebSocketHandshakeResponse.h" />
<ClInclude Include="..\Modules\websockets\WorkerThreadableWebSocketChannel.h" />
<ClInclude Include="..\Modules\speech\DOMWindowSpeechSynthesis.h" />
<ClInclude Include="..\Modules\speech\SpeechSynthesis.h" />
......@@ -588,9 +588,6 @@
<ClCompile Include="..\Modules\websockets\WebSocketHandshake.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
<ClCompile Include="..\Modules\websockets\WebSocketHandshakeRequest.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
<ClCompile Include="..\Modules\websockets\WebSocketHandshakeResponse.cpp">
<Filter>Modules\websockets</Filter>
</ClCompile>
......@@ -7284,9 +7281,6 @@
<ClInclude Include="..\Modules\websockets\WebSocketHandshake.h">
<Filter>Modules\websockets</Filter>
</ClInclude>
<ClInclude Include="..\Modules\websockets\WebSocketHandshakeRequest.h">
<Filter>Modules\websockets</Filter>
</ClInclude>
<ClInclude Include="..\Modules\websockets\WebSocketHandshakeResponse.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 */; };
97AABD2814FA09D5007457AE /* WebSocketHandshakeRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97AABD0D14FA09D5007457AE /* WebSocketHandshakeRequest.cpp */; };
97AABD2914FA09D5007457AE /* WebSocketHandshakeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AABD0E14FA09D5007457AE /* WebSocketHandshakeRequest.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 */; };
......@@ -9657,8 +9655,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>"; };
97AABD0D14FA09D5007457AE /* WebSocketHandshakeRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSocketHandshakeRequest.cpp; path = Modules/websockets/WebSocketHandshakeRequest.cpp; sourceTree = "<group>"; };
97AABD0E14FA09D5007457AE /* WebSocketHandshakeRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketHandshakeRequest.h; path = Modules/websockets/WebSocketHandshakeRequest.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>"; };
......@@ -16405,8 +16401,6 @@
97AABD0A14FA09D5007457AE /* WebSocketFrame.h */,
97AABD0B14FA09D5007457AE /* WebSocketHandshake.cpp */,
97AABD0C14FA09D5007457AE /* WebSocketHandshake.h */,
97AABD0D14FA09D5007457AE /* WebSocketHandshakeRequest.cpp */,
97AABD0E14FA09D5007457AE /* WebSocketHandshakeRequest.h */,
97AABD0F14FA09D5007457AE /* WebSocketHandshakeResponse.cpp */,
97AABD1014FA09D5007457AE /* WebSocketHandshakeResponse.h */,
A886CDC214FBBAA300D279F4 /* WorkerContextWebSocket.idl */,
......@@ -23996,7 +23990,6 @@
97AABD2414FA09D5007457AE /* WebSocketExtensionProcessor.h in Headers */,
97AABD2514FA09D5007457AE /* WebSocketFrame.h in Headers */,
97AABD2714FA09D5007457AE /* WebSocketHandshake.h in Headers */,
97AABD2914FA09D5007457AE /* WebSocketHandshakeRequest.h in Headers */,
97AABD2B14FA09D5007457AE /* WebSocketHandshakeResponse.h in Headers */,
0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */,
0FCF332D0F2B9A25004B6795 /* WebTiledLayer.h in Headers */,
......@@ -26982,7 +26975,6 @@
4A5A2ADB161E7E00005889DD /* WebSocketExtensionParser.cpp in Sources */,
AAF5B7B71524B6C50004CB49 /* WebSocketFrame.cpp in Sources */,
97AABD2614FA09D5007457AE /* WebSocketHandshake.cpp in Sources */,
97AABD2814FA09D5007457AE /* WebSocketHandshakeRequest.cpp in Sources */,
97AABD2A14FA09D5007457AE /* WebSocketHandshakeResponse.cpp in Sources */,
0F580FA41496939100FB5BD8 /* WebTiledBackingLayer.mm in Sources */,
0FCF332C0F2B9A25004B6795 /* WebTiledLayer.mm in Sources */,
......@@ -1160,7 +1160,7 @@ void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents* instr
timelineAgent->didCreateWebSocket(identifier, requestURL, protocol, document->frame());
}
void InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const WebSocketHandshakeRequest& request, Document* document)
void InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const ResourceRequest& request, Document* document)
{
if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
resourceAgent->willSendWebSocketHandshakeRequest(identifier, request);
......
......@@ -44,7 +44,6 @@
#include "ScriptState.h"
#include "StorageArea.h"
#include "WebSocketFrame.h"
#include "WebSocketHandshakeRequest.h"
#include "WebSocketHandshakeResponse.h"
#include <wtf/RefPtr.h>
......@@ -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 WebSocketHandshakeRequest&);
static void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const ResourceRequest&);
static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const WebSocketHandshakeResponse&);
static void didCloseWebSocket(Document*, unsigned long identifier);
static void didReceiveWebSocketFrame(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 WebSocketHandshakeRequest&, Document*);
static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents*, unsigned long identifier, const ResourceRequest&, Document*);
static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketHandshakeResponse&, Document*);
static void didCloseWebSocketImpl(InstrumentingAgents*, unsigned long identifier, Document*);
static void didReceiveWebSocketFrameImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketFrame&);
......@@ -1848,7 +1847,7 @@ inline void InspectorInstrumentation::didCreateWebSocket(Document* document, uns
#endif
}
inline void InspectorInstrumentation::willSendWebSocketHandshakeRequest(Document* document, unsigned long identifier, const WebSocketHandshakeRequest& request)
inline void InspectorInstrumentation::willSendWebSocketHandshakeRequest(Document* document, unsigned long identifier, const ResourceRequest& request)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
......
......@@ -67,7 +67,6 @@
#include "Settings.h"
#include "SubresourceLoader.h"
#include "WebSocketFrame.h"
#include "WebSocketHandshakeRequest.h"
#include "WebSocketHandshakeResponse.h"
#include "XMLHttpRequest.h"
......@@ -487,10 +486,10 @@ void InspectorResourceAgent::didCreateWebSocket(unsigned long identifier, const
m_frontend->webSocketCreated(IdentifiersFactory::requestId(identifier), requestURL.string());
}
void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long identifier, const WebSocketHandshakeRequest& request)
void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest& request)
{
RefPtr<TypeBuilder::Network::WebSocketRequest> requestObject = TypeBuilder::Network::WebSocketRequest::create()
.setHeaders(buildObjectForHeaders(request.headerFields()));
.setHeaders(buildObjectForHeaders(request.httpHeaderFields()));
m_frontend->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(identifier), currentTime(), requestObject);
}
......
......@@ -74,7 +74,6 @@ class XMLHttpRequest;
#if ENABLE(WEB_SOCKETS)
struct WebSocketFrame;
class WebSocketHandshakeRequest;
class WebSocketHandshakeResponse;
#endif
......@@ -127,7 +126,7 @@ public:
#if ENABLE(WEB_SOCKETS)
void didCreateWebSocket(unsigned long identifier, const KURL& requestURL);
void willSendWebSocketHandshakeRequest(unsigned long identifier, const WebSocketHandshakeRequest&);
void willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest&);
void didReceiveWebSocketHandshakeResponse(unsigned long identifier, const WebSocketHandshakeResponse&);
void didCloseWebSocket(unsigned long identifier);
void didReceiveWebSocketFrame(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