Index: public/platform/WebSocketHandle.h |
diff --git a/public/platform/WebDeviceOrientationData.h b/public/platform/WebSocketHandle.h |
similarity index 68% |
copy from public/platform/WebDeviceOrientationData.h |
copy to public/platform/WebSocketHandle.h |
index 072dd09b867550bf4ba03cfc4e67f7abb3bc7405..98a77928b2e4d4558c80aa2b2782dedcc068e986 100644 |
--- a/public/platform/WebDeviceOrientationData.h |
+++ b/public/platform/WebSocketHandle.h |
@@ -28,44 +28,37 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WebDeviceOrientationData_h |
-#define WebDeviceOrientationData_h |
+#ifndef WebSocketHandle_h |
+#define WebSocketHandle_h |
#include "WebCommon.h" |
- |
-#if WEBKIT_IMPLEMENTATION |
-#include "wtf/Assertions.h" |
-#endif |
+#include "WebVector.h" |
namespace WebKit { |
-#pragma pack(push, 1) |
+class WebData; |
+class WebSocketHandleClient; |
+class WebString; |
+class WebURL; |
-class WebDeviceOrientationData { |
+// FIXME: This class will replace WebSocketStreamHandle. |
+class WebSocketHandle { |
public: |
- WEBKIT_EXPORT WebDeviceOrientationData(); |
- ~WebDeviceOrientationData() { } |
- |
- double alpha; |
- double beta; |
- double gamma; |
- |
- bool hasAlpha : 1; |
- bool hasBeta : 1; |
- bool hasGamma : 1; |
+ enum MessageType { |
+ MessageTypeText, |
+ MessageTypeBinary, |
+ MessageTypeContinuation, |
+ }; |
- bool absolute : 1; |
- bool hasAbsolute : 1; |
+ virtual ~WebSocketHandle() { } |
- bool allAvailableSensorsAreActive : 1; |
+ virtual void connect(const WebURL& /* url */, const WebVector<WebString>& protocols, const WebString& origin, WebSocketHandleClient*) = 0; |
+ virtual void send(MessageType, const char* data, size_t /* size */, bool fin) = 0; |
+ virtual void flowControl(int64_t quota); |
+ virtual void close(unsigned short code, const WebString& reason) = 0; |
}; |
-#if WEBKIT_IMPLEMENTATION |
-COMPILE_ASSERT(sizeof(WebDeviceOrientationData) == (3 * sizeof(double) + 1 * sizeof(char)), WebDeviceOrientationData_has_wrong_size); |
-#endif |
- |
-#pragma pack(pop) |
- |
} // namespace WebKit |
-#endif // WebDeviceOrientationData_h |
+#endif // WebSocketHandle_h |
+ |