| Index: webkit/child/websocket_handle_bridge.h
|
| diff --git a/webkit/child/websocket_handle_bridge.h b/webkit/child/websocket_handle_bridge.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f76313f43138c622180db9da8631e7a293b42df5
|
| --- /dev/null
|
| +++ b/webkit/child/websocket_handle_bridge.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef WEBKIT_CHILD_WEBSOCKET_HANDLE_BRIDGE_H_
|
| +#define WEBKIT_CHILD_WEBSOCKET_HANDLE_BRIDGE_H_
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/ref_counted.h"
|
| +
|
| +class GURL;
|
| +
|
| +namespace webkit_glue {
|
| +class WebSocketHandleDelegate;
|
| +
|
| +class WebSocketHandleBridge
|
| + : public base::RefCountedThreadSafe<WebSocketHandleBridge> {
|
| + public:
|
| + enum MessageType {
|
| + MESSAGE_TYPE_TEXT,
|
| + MESSAGE_TYPE_BINARY,
|
| + MESSAGE_TYPE_CONTINUATION,
|
| + };
|
| +
|
| + virtual void Connect(const GURL& url,
|
| + const std::vector<std::string>& protocols,
|
| + const GURL& origin,
|
| + WebSocketHandleDelegate* delegate) = 0;
|
| + virtual void Send(MessageType type,
|
| + const char* data,
|
| + size_t size,
|
| + bool fin) = 0;
|
| + virtual void FlowControl(int64_t quota) = 0;
|
| + virtual void Close(unsigned short code, const std::string& reason) = 0;
|
| + virtual void Disconnect() = 0;
|
| +
|
| + protected:
|
| + friend class base::RefCountedThreadSafe<WebSocketHandleBridge>;
|
| + WebSocketHandleBridge() {}
|
| + virtual ~WebSocketHandleBridge() {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WebSocketHandleBridge);
|
| +};
|
| +
|
| +} // namespace webkit_glue
|
| +
|
| +#endif // WEBKIT_CHILD_WEBSOCKET_HANDLE_BRIDGE_H_
|
|
|