| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "mojo/services/html_viewer/websockethandle_impl.h" | 5 #include "mojo/services/html_viewer/websockethandle_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "mojo/services/html_viewer/blink_basic_type_converters.h" | 12 #include "mojo/services/html_viewer/blink_basic_type_converters.h" |
| 13 #include "mojo/services/public/cpp/network/web_socket_read_queue.h" | 13 #include "mojo/services/network/public/cpp/web_socket_read_queue.h" |
| 14 #include "mojo/services/public/cpp/network/web_socket_write_queue.h" | 14 #include "mojo/services/network/public/cpp/web_socket_write_queue.h" |
| 15 #include "mojo/services/public/interfaces/network/network_service.mojom.h" | 15 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| 16 #include "third_party/WebKit/public/platform/WebSerializedOrigin.h" | 16 #include "third_party/WebKit/public/platform/WebSerializedOrigin.h" |
| 17 #include "third_party/WebKit/public/platform/WebSocketHandleClient.h" | 17 #include "third_party/WebKit/public/platform/WebSocketHandleClient.h" |
| 18 #include "third_party/WebKit/public/platform/WebString.h" | 18 #include "third_party/WebKit/public/platform/WebString.h" |
| 19 #include "third_party/WebKit/public/platform/WebURL.h" | 19 #include "third_party/WebKit/public/platform/WebURL.h" |
| 20 #include "third_party/WebKit/public/platform/WebVector.h" | 20 #include "third_party/WebKit/public/platform/WebVector.h" |
| 21 | 21 |
| 22 using blink::WebSerializedOrigin; | 22 using blink::WebSerializedOrigin; |
| 23 using blink::WebSocketHandle; | 23 using blink::WebSocketHandle; |
| 24 using blink::WebSocketHandleClient; | 24 using blink::WebSocketHandleClient; |
| 25 using blink::WebString; | 25 using blink::WebString; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 const char* data) { | 206 const char* data) { |
| 207 web_socket_->Send(fin, ConvertTo<WebSocket::MessageType>(type), num_bytes); | 207 web_socket_->Send(fin, ConvertTo<WebSocket::MessageType>(type), num_bytes); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void WebSocketHandleImpl::Disconnect() { | 210 void WebSocketHandleImpl::Disconnect() { |
| 211 did_close_ = true; | 211 did_close_ = true; |
| 212 client_.reset(); | 212 client_.reset(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace mojo | 215 } // namespace mojo |
| OLD | NEW |