| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 5 #ifndef REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| 6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 bool closed_; | 104 bool closed_; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 class BufferedSocketWriter : public BufferedSocketWriterBase { | 107 class BufferedSocketWriter : public BufferedSocketWriterBase { |
| 108 public: | 108 public: |
| 109 explicit BufferedSocketWriter(base::MessageLoopProxy* message_loop); | 109 explicit BufferedSocketWriter(base::MessageLoopProxy* message_loop); |
| 110 virtual ~BufferedSocketWriter(); | 110 virtual ~BufferedSocketWriter(); |
| 111 | 111 |
| 112 protected: | 112 protected: |
| 113 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size); | 113 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE; |
| 114 virtual void AdvanceBufferPosition_Locked(int written); | 114 virtual void AdvanceBufferPosition_Locked(int written) OVERRIDE; |
| 115 virtual void OnError_Locked(int result); | 115 virtual void OnError_Locked(int result) OVERRIDE; |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 scoped_refptr<net::DrainableIOBuffer> current_buf_; | 118 scoped_refptr<net::DrainableIOBuffer> current_buf_; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 class BufferedDatagramWriter : public BufferedSocketWriterBase { | 121 class BufferedDatagramWriter : public BufferedSocketWriterBase { |
| 122 public: | 122 public: |
| 123 explicit BufferedDatagramWriter(base::MessageLoopProxy* message_loop); | 123 explicit BufferedDatagramWriter(base::MessageLoopProxy* message_loop); |
| 124 virtual ~BufferedDatagramWriter(); | 124 virtual ~BufferedDatagramWriter(); |
| 125 | 125 |
| 126 protected: | 126 protected: |
| 127 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size); | 127 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE; |
| 128 virtual void AdvanceBufferPosition_Locked(int written); | 128 virtual void AdvanceBufferPosition_Locked(int written) OVERRIDE; |
| 129 virtual void OnError_Locked(int result); | 129 virtual void OnError_Locked(int result) OVERRIDE; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace protocol | 132 } // namespace protocol |
| 133 } // namespace remoting | 133 } // namespace remoting |
| 134 | 134 |
| 135 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 135 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| OLD | NEW |