OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // An implementation of WebSocketStreamHandle. | 5 // An implementation of WebSocketStreamHandle. |
6 | 6 |
7 #include "webkit/glue/websocketstreamhandle_impl.h" | 7 #include "webkit/glue/websocketstreamhandle_impl.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "webkit/api/public/WebData.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" |
16 #include "webkit/api/public/WebURL.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
17 #include "webkit/api/public/WebSocketStreamHandleClient.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebSocketStreamHandleClient.
h" |
18 #include "webkit/glue/websocketstreamhandle_bridge.h" | 18 #include "webkit/glue/websocketstreamhandle_bridge.h" |
19 #include "webkit/glue/websocketstreamhandle_delegate.h" | 19 #include "webkit/glue/websocketstreamhandle_delegate.h" |
20 | 20 |
21 namespace webkit_glue { | 21 namespace webkit_glue { |
22 | 22 |
23 // WebSocketStreamHandleImpl::Context ----------------------------------------- | 23 // WebSocketStreamHandleImpl::Context ----------------------------------------- |
24 | 24 |
25 class WebSocketStreamHandleImpl::Context | 25 class WebSocketStreamHandleImpl::Context |
26 : public base::RefCounted<Context>, | 26 : public base::RefCounted<Context>, |
27 public WebSocketStreamHandleDelegate { | 27 public WebSocketStreamHandleDelegate { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 bool WebSocketStreamHandleImpl::send(const WebKit::WebData& data) { | 169 bool WebSocketStreamHandleImpl::send(const WebKit::WebData& data) { |
170 return context_->Send(data); | 170 return context_->Send(data); |
171 } | 171 } |
172 | 172 |
173 void WebSocketStreamHandleImpl::close() { | 173 void WebSocketStreamHandleImpl::close() { |
174 context_->Close(); | 174 context_->Close(); |
175 } | 175 } |
176 | 176 |
177 } // namespace webkit_glue | 177 } // namespace webkit_glue |
OLD | NEW |