OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/renderer_host/websocket_host.h" | 5 #include "content/browser/renderer_host/websocket_host.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 9 #include "content/browser/renderer_host/websocket_dispatcher_host.h" |
10 #include "content/common/websocket_messages.h" | 10 #include "content/common/websocket_messages.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 channel_->SendFrame(fin, MessageTypeToOpCode(type), data); | 168 channel_->SendFrame(fin, MessageTypeToOpCode(type), data); |
169 } | 169 } |
170 | 170 |
171 void WebSocketHost::OnFlowControl(int64 quota) { | 171 void WebSocketHost::OnFlowControl(int64 quota) { |
172 DVLOG(3) << "WebSocketHost::OnFlowControl" | 172 DVLOG(3) << "WebSocketHost::OnFlowControl" |
173 << " routing_id= " << routing_id_ << " quota= " << quota; | 173 << " routing_id= " << routing_id_ << " quota= " << quota; |
174 | 174 |
175 channel_->SendFlowControl(quota); | 175 channel_->SendFlowControl(quota); |
176 } | 176 } |
177 | 177 |
178 void WebSocketHost::OnDropChannel(uint16 code, const std::string& reason) { | 178 void WebSocketHost::OnDropChannel(bool was_clean, |
| 179 uint16 code, |
| 180 const std::string& reason) { |
179 DVLOG(3) << "WebSocketDispatcherHost::OnDropChannel" | 181 DVLOG(3) << "WebSocketDispatcherHost::OnDropChannel" |
180 << " routing_id= " << routing_id_ << " code= " << code | 182 << " routing_id= " << routing_id_ << " was_clean = " << was_clean |
181 << " reason= " << reason; | 183 << " code= " << code << " reason= " << reason; |
182 | 184 |
| 185 // TODO(yhirano): Handle |was_clean| appropriately. |
183 channel_->StartClosingHandshake(code, reason); | 186 channel_->StartClosingHandshake(code, reason); |
184 } | 187 } |
185 | 188 |
186 | 189 |
187 } // namespace content | 190 } // namespace content |
OLD | NEW |