| 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 "network/public/cpp/web_socket_write_queue.h" | 5 #include "network/public/cpp/web_socket_write_queue.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 9 | 11 |
| 10 namespace mojo { | 12 namespace mojo { |
| 11 | 13 |
| 12 struct WebSocketWriteQueue::Operation { | 14 struct WebSocketWriteQueue::Operation { |
| 13 uint32_t num_bytes_; | 15 uint32_t num_bytes_; |
| 14 base::Callback<void(const char*)> callback_; | 16 base::Callback<void(const char*)> callback_; |
| 15 | 17 |
| 16 const char* data_; | 18 const char* data_; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 base::Bind(&WebSocketWriteQueue::OnHandleReady, | 95 base::Bind(&WebSocketWriteQueue::OnHandleReady, |
| 94 base::Unretained(this))); | 96 base::Unretained(this))); |
| 95 } | 97 } |
| 96 | 98 |
| 97 void WebSocketWriteQueue::OnHandleReady(MojoResult result) { | 99 void WebSocketWriteQueue::OnHandleReady(MojoResult result) { |
| 98 DCHECK(is_busy_); | 100 DCHECK(is_busy_); |
| 99 TryToWrite(); | 101 TryToWrite(); |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace mojo | 104 } // namespace mojo |
| OLD | NEW |