summaryrefslogtreecommitdiffstats
path: root/webkit/child/websocketstreamhandle_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/child/websocketstreamhandle_impl.h')
-rw-r--r--webkit/child/websocketstreamhandle_impl.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/webkit/child/websocketstreamhandle_impl.h b/webkit/child/websocketstreamhandle_impl.h
new file mode 100644
index 0000000..911b83e2
--- /dev/null
+++ b/webkit/child/websocketstreamhandle_impl.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 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_WEBSOCKETSTREAMHANDLE_IMPL_H_
+#define WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/supports_user_data.h"
+#include "third_party/WebKit/public/platform/WebSocketStreamHandle.h"
+
+namespace webkit_glue {
+
+class WebKitPlatformSupportImpl;
+
+class WebSocketStreamHandleImpl
+ : public base::SupportsUserData,
+ public WebKit::WebSocketStreamHandle {
+ public:
+ explicit WebSocketStreamHandleImpl(WebKitPlatformSupportImpl* platform);
+ virtual ~WebSocketStreamHandleImpl();
+
+ // WebSocketStreamHandle methods:
+ virtual void connect(
+ const WebKit::WebURL& url,
+ WebKit::WebSocketStreamHandleClient* client);
+ virtual bool send(const WebKit::WebData& data);
+ virtual void close();
+
+ private:
+ class Context;
+ scoped_refptr<Context> context_;
+ WebKitPlatformSupportImpl* platform_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl);
+};
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_IMPL_H_