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 #ifndef MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ |
6 #define MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ | 6 #define MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
11 #include "mojo/message_pump/handle_watcher.h" | 13 #include "mojo/message_pump/handle_watcher.h" |
12 #include "mojo/public/cpp/system/data_pipe.h" | 14 #include "mojo/public/cpp/system/data_pipe.h" |
13 | 15 |
14 namespace mojo { | 16 namespace mojo { |
15 | 17 |
16 // This class simplifies the handling of multiple Writes on a DataPipe. It | 18 // This class simplifies the handling of multiple Writes on a DataPipe. It |
17 // writes each chunk all at once (or waits until the pipe is ready before | 19 // writes each chunk all at once (or waits until the pipe is ready before |
(...skipping 19 matching lines...) Expand all Loading... |
37 DataPipeProducerHandle handle_; | 39 DataPipeProducerHandle handle_; |
38 common::HandleWatcher handle_watcher_; | 40 common::HandleWatcher handle_watcher_; |
39 ScopedVector<Operation> queue_; | 41 ScopedVector<Operation> queue_; |
40 bool is_busy_; | 42 bool is_busy_; |
41 base::WeakPtrFactory<WebSocketWriteQueue> weak_factory_; | 43 base::WeakPtrFactory<WebSocketWriteQueue> weak_factory_; |
42 }; | 44 }; |
43 | 45 |
44 } // namespace mojo | 46 } // namespace mojo |
45 | 47 |
46 #endif // MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ | 48 #endif // MOJO_SERVICES_NETWORK_PUBLIC_CPP_WEB_SOCKET_WRITE_QUEUE_H_ |
OLD | NEW |