| Index: third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
|
| diff --git a/third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h b/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
|
| similarity index 75%
|
| rename from third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
|
| rename to third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
|
| index 189a9bf7c9b2acdc7e559e249f1622d2822acf55..1b7e4a11cbc7165d1d87cd826b71aaf1b58f6bca 100644
|
| --- a/third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
|
| +++ b/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
|
| @@ -31,21 +31,22 @@
|
| #ifndef WebSocketHandle_h
|
| #define WebSocketHandle_h
|
|
|
| -#include "public/platform/WebCommon.h"
|
| -#include "public/platform/WebVector.h"
|
| +#include "wtf/Forward.h"
|
| +#include "wtf/Vector.h"
|
| +#include <stdint.h>
|
|
|
| namespace blink {
|
|
|
| -class WebSecurityOrigin;
|
| +class InterfaceProvider;
|
| +class KURL;
|
| +class SecurityOrigin;
|
| class WebSocketHandleClient;
|
| -class WebString;
|
| -class WebURL;
|
|
|
| // WebSocketHandle is an interface class designed to be a handle of WebSocket connection.
|
| // WebSocketHandle will be used together with WebSocketHandleClient.
|
| //
|
| // Once a WebSocketHandle is deleted there will be no notification to the corresponding WebSocketHandleClient.
|
| -// Once a WebSocketHandleClient receives DidClose, any method of the corresponding WebSocketHandle can't be called.
|
| +// Once a WebSocketHandleClient receives didClose, any method of the corresponding WebSocketHandle can't be called.
|
|
|
| class WebSocketHandle {
|
| public:
|
| @@ -55,12 +56,17 @@ public:
|
| MessageTypeBinary,
|
| };
|
|
|
| - virtual ~WebSocketHandle() { }
|
| + virtual ~WebSocketHandle() {}
|
|
|
| - virtual void connect(const WebURL&, const WebVector<WebString>& protocols, const WebSecurityOrigin&, const WebURL& first_party_for_cookies, const WebString& user_agent_override, WebSocketHandleClient*) = 0;
|
| - virtual void send(bool fin, MessageType, const char* data, size_t /* size */) = 0;
|
| + // This method may optionally be called before connect() to specify an
|
| + // InterfaceProvider to get a WebSocket instance. By default, connect() will
|
| + // use Platform::interfaceProvider().
|
| + virtual void initialize(InterfaceProvider*) = 0;
|
| +
|
| + virtual void connect(const KURL&, const Vector<String>& protocols, SecurityOrigin*, const KURL& firstPartyForCookies, const String& userAgentOverride, WebSocketHandleClient*) = 0;
|
| + virtual void send(bool fin, MessageType, const char* data, size_t) = 0;
|
| virtual void flowControl(int64_t quota) = 0;
|
| - virtual void close(unsigned short code, const WebString& reason) = 0;
|
| + virtual void close(unsigned short code, const String& reason) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|