Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / child / web_socket_stream_handle_impl.h
blobc8c2aca6a47e9e0e33992f01a5993a63ed786f3a
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_WEB_SOCKET_STREAM_HANDLE_IMPL_H_
6 #define CONTENT_CHILD_WEB_SOCKET_STREAM_HANDLE_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/supports_user_data.h"
10 #include "third_party/WebKit/public/platform/WebSocketStreamHandle.h"
12 namespace content {
14 class WebSocketStreamHandleImpl : public base::SupportsUserData,
15 public blink::WebSocketStreamHandle {
16 public:
17 WebSocketStreamHandleImpl();
18 virtual ~WebSocketStreamHandleImpl();
20 // WebSocketStreamHandle methods:
21 virtual void connect(const blink::WebURL& url,
22 blink::WebSocketStreamHandleClient* client);
23 virtual bool send(const blink::WebData& data);
24 virtual void close();
26 private:
27 class Context;
28 scoped_refptr<Context> context_;
30 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl);
33 } // namespace content
35 #endif // CONTENT_CHILD_WEB_SOCKET_STREAM_HANDLE_IMPL_H_