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..71e7cc34b0cf63960e5e42c8f3b08f27a680baa9 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(const char* data, size_t /* size */, MessageType, bool fin) = 0; |
yhirano
2013/08/23 06:57:13
(type, data, fin) is better than (data, type, fin)
yhirano
2013/08/23 07:01:01
Done.
|
+ 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 |
+ |