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

Unified Diff: third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h

Issue 2279763003: Revert "Move WebSocketHandleImpl into Blink" (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.h b/third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
similarity index 58%
copy from third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.h
copy to third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
index 6ec3ffee1cbe33e60cfae7adc58bf296142a1985..189a9bf7c9b2acdc7e559e249f1622d2822acf55 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.h
+++ b/third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h
@@ -28,41 +28,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AnimatableVisibility_h
-#define AnimatableVisibility_h
+#ifndef WebSocketHandle_h
+#define WebSocketHandle_h
-#include "core/CoreExport.h"
-#include "core/animation/animatable/AnimatableValue.h"
-#include "core/style/ComputedStyleConstants.h"
+#include "public/platform/WebCommon.h"
+#include "public/platform/WebVector.h"
namespace blink {
-class CORE_EXPORT AnimatableVisibility final : public AnimatableValue {
-public:
- ~AnimatableVisibility() override { }
- static PassRefPtr<AnimatableVisibility> create(EVisibility visibility)
- {
- return adoptRef(new AnimatableVisibility(visibility));
- }
+class WebSecurityOrigin;
+class WebSocketHandleClient;
+class WebString;
+class WebURL;
+
+// WebSocketHandle is an interface class designed to be a handle of WebSocket connection.
+// WebSocketHandle will be used together with WebSocketHandleClient.
+//
+// Once a WebSocketHandle is deleted there will be no notification to the corresponding WebSocketHandleClient.
+// Once a WebSocketHandleClient receives DidClose, any method of the corresponding WebSocketHandle can't be called.
- EVisibility visibility() const { return m_visibility; }
+class WebSocketHandle {
+public:
+ enum MessageType {
+ MessageTypeContinuation,
+ MessageTypeText,
+ MessageTypeBinary,
+ };
-protected:
- PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const override;
- bool usesDefaultInterpolationWith(const AnimatableValue*) const override;
+ virtual ~WebSocketHandle() { }
-private:
- explicit AnimatableVisibility(EVisibility visibility)
- : m_visibility(visibility)
- {
- }
- AnimatableType type() const override { return TypeVisibility; }
- bool equalTo(const AnimatableValue*) const override;
- const EVisibility m_visibility;
+ virtual void connect(const WebURL&, const WebVector<WebString>& protocols, const WebSecurityOrigin&, const WebURL& first_party_for_cookies, const WebString& user_agent_override, WebSocketHandleClient*) = 0;
+ virtual void send(bool fin, MessageType, const char* data, size_t /* size */) = 0;
+ virtual void flowControl(int64_t quota) = 0;
+ virtual void close(unsigned short code, const WebString& reason) = 0;
};
-DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableVisibility, isVisibility());
-
} // namespace blink
-#endif // AnimatableVisibility_h
+#endif // WebSocketHandle_h

Powered by Google App Engine
This is Rietveld 408576698