Revert 224458 "Enabling MediaStreamInfoBarTest.DenyingCameraDoes..."
[chromium-blink-merge.git] / webkit / child / websocketstreamhandle_impl.h
blob911b83e205e278a33c599675e88b4a9bfb786012
1 // Copyright (c) 2012 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 WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_IMPL_H_
6 #define WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_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 webkit_glue {
14 class WebKitPlatformSupportImpl;
16 class WebSocketStreamHandleImpl
17 : public base::SupportsUserData,
18 public WebKit::WebSocketStreamHandle {
19 public:
20 explicit WebSocketStreamHandleImpl(WebKitPlatformSupportImpl* platform);
21 virtual ~WebSocketStreamHandleImpl();
23 // WebSocketStreamHandle methods:
24 virtual void connect(
25 const WebKit::WebURL& url,
26 WebKit::WebSocketStreamHandleClient* client);
27 virtual bool send(const WebKit::WebData& data);
28 virtual void close();
30 private:
31 class Context;
32 scoped_refptr<Context> context_;
33 WebKitPlatformSupportImpl* platform_;
35 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl);
38 } // namespace webkit_glue
40 #endif // WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_IMPL_H_