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

Unified Diff: webkit/child/websocket_handle_impl.h

Issue 22815034: Introduce webkit_glue bridges for the new WebSocket Implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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: webkit/child/websocket_handle_impl.h
diff --git a/webkit/child/websocket_handle_impl.h b/webkit/child/websocket_handle_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..a5cda8cfb8502ef4aaa1e3fd16b138f2f129c001
--- /dev/null
+++ b/webkit/child/websocket_handle_impl.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_
+#define WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "third_party/WebKit/public/platform/WebSocketHandle.h"
+
+namespace webkit_glue {
+
+class WebKitPlatformSupportImpl;
+
+class WebSocketHandleImpl : public WebKit::WebSocketHandle {
+ public:
+ explicit WebSocketHandleImpl(WebKitPlatformSupportImpl* platform);
+ virtual ~WebSocketHandleImpl();
+
+ // WebSocketHandle functions.
+ virtual void connect(const WebKit::WebURL& url,
+ const WebKit::WebVector<WebKit::WebString>& protocols,
+ const WebKit::WebString& origin,
+ WebKit::WebSocketHandleClient* client) OVERRIDE;
+ virtual void send(bool fin,
+ WebKit::WebSocketHandle::MessageType type,
+ const char* data,
+ size_t size) OVERRIDE;
+ virtual void flowControl(int64 quota) OVERRIDE;
+ virtual void close(unsigned short code,
+ const WebKit::WebString& reason) OVERRIDE;
+
+ private:
+ class Context;
+ scoped_ptr<Context> context_;
+ WebKitPlatformSupportImpl* platform_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebSocketHandleImpl);
+};
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698