Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: public/platform/WebSocketHandle.h

Issue 22914026: [ABANDONED] Introduce blink-side bridges for the new WebSocket implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/Platform.h ('k') | public/platform/WebSocketHandleClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+
« no previous file with comments | « public/platform/Platform.h ('k') | public/platform/WebSocketHandleClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698