Home | History | Annotate | Download | only in child
      1 // Copyright (c) 2011 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.
      4 
      5 #ifndef WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_BRIDGE_H_
      6 #define WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_BRIDGE_H_
      7 
      8 #include <vector>
      9 
     10 #include "base/basictypes.h"
     11 #include "base/memory/ref_counted.h"
     12 
     13 class GURL;
     14 
     15 namespace webkit_glue {
     16 
     17 class WebSocketStreamHandleBridge
     18     : public base::RefCountedThreadSafe<WebSocketStreamHandleBridge> {
     19  public:
     20   virtual void Connect(const GURL& url) = 0;
     21 
     22   virtual bool Send(const std::vector<char>& data) = 0;
     23 
     24   virtual void Close() = 0;
     25 
     26  protected:
     27   friend class base::RefCountedThreadSafe<WebSocketStreamHandleBridge>;
     28   WebSocketStreamHandleBridge() {}
     29   virtual ~WebSocketStreamHandleBridge() {}
     30 
     31  private:
     32   DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleBridge);
     33 };
     34 
     35 }  // namespace webkit_glue
     36 
     37 #endif  // WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_BRIDGE_H_
     38