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

Side by Side Diff: public/platform/WebSocketChannelHandle.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebDeviceOrientationData_h 31 #ifndef WebSocketChannelHandle_h
32 #define WebDeviceOrientationData_h 32 #define WebSocketChannelHandle_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 35 #include "WebVector.h"
36 #if WEBKIT_IMPLEMENTATION
37 #include "wtf/Assertions.h"
38 #endif
39 36
40 namespace WebKit { 37 namespace WebKit {
41 38
42 #pragma pack(push, 1) 39 class WebData;
40 class WebSocketChannelHandleClient;
41 class WebString;
42 class WebURL;
43 43
44 class WebDeviceOrientationData { 44 // FIXME: This class will replace WebSocketStreamHandle.
45 class WebSocketChannelHandle {
45 public: 46 public:
46 WEBKIT_EXPORT WebDeviceOrientationData(); 47 enum MessageType {
47 ~WebDeviceOrientationData() { } 48 MessageTypeText,
49 MessageTypeBinary,
50 MessageTypeContinuation,
51 };
48 52
49 double alpha; 53 virtual ~WebSocketChannelHandle() { }
50 double beta;
51 double gamma;
52 54
53 bool hasAlpha : 1; 55 virtual void connect(const WebURL& /* url */, const WebVector<WebString>& pr otocols, const WebString& origin, WebSocketChannelHandleClient*) = 0;
abarth-chromium 2013/08/22 19:39:07 No need for /* */ around argument names. Just put
yhirano 2013/08/23 01:35:13 check-webkit-style complains as: The parameter n
54 bool hasBeta : 1; 56 virtual void send(const char* data, size_t /* size */, MessageType, bool fin ) = 0;
55 bool hasGamma : 1; 57 virtual void flowControl(int64_t quota);
56 58 virtual void close(unsigned short code, const WebString& reason) = 0;
57 bool absolute : 1;
58 bool hasAbsolute : 1;
59
60 bool allAvailableSensorsAreActive : 1;
61 }; 59 };
62 60
63 #if WEBKIT_IMPLEMENTATION
64 COMPILE_ASSERT(sizeof(WebDeviceOrientationData) == (3 * sizeof(double) + 1 * siz eof(char)), WebDeviceOrientationData_has_wrong_size);
65 #endif
66
67 #pragma pack(pop)
68
69 } // namespace WebKit 61 } // namespace WebKit
70 62
71 #endif // WebDeviceOrientationData_h 63 #endif // WebSocketChannelHandle_h
64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698