Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: webrtc/api/datachannelinterface.h

Issue 2524033002: DataChannelInterface: Remove default implementation of methods. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // implemented these APIs. They should all just return the values the 118 // implemented these APIs. They should all just return the values the
119 // DataChannel was created with. 119 // DataChannel was created with.
120 virtual bool ordered() const { return false; } 120 virtual bool ordered() const { return false; }
121 virtual uint16_t maxRetransmitTime() const { return 0; } 121 virtual uint16_t maxRetransmitTime() const { return 0; }
122 virtual uint16_t maxRetransmits() const { return 0; } 122 virtual uint16_t maxRetransmits() const { return 0; }
123 virtual std::string protocol() const { return std::string(); } 123 virtual std::string protocol() const { return std::string(); }
124 virtual bool negotiated() const { return false; } 124 virtual bool negotiated() const { return false; }
125 125
126 virtual int id() const = 0; 126 virtual int id() const = 0;
127 virtual DataState state() const = 0; 127 virtual DataState state() const = 0;
128 // TODO(hbos): Default implementations of [messages/bytes]_[sent/received] as 128 virtual uint32_t messages_sent() const = 0;
129 // to not break Chromium. Fix Chromium's implementation as soon as this rolls. 129 virtual uint64_t bytes_sent() const = 0;
130 // crbug.com/654927 130 virtual uint32_t messages_received() const = 0;
131 virtual uint32_t messages_sent() const { return 0; } 131 virtual uint64_t bytes_received() const = 0;
132 virtual uint64_t bytes_sent() const { return 0; }
133 virtual uint32_t messages_received() const { return 0; }
134 virtual uint64_t bytes_received() const { return 0; }
135 // The buffered_amount returns the number of bytes of application data 132 // The buffered_amount returns the number of bytes of application data
136 // (UTF-8 text and binary data) that have been queued using SendBuffer but 133 // (UTF-8 text and binary data) that have been queued using SendBuffer but
137 // have not yet been transmitted to the network. 134 // have not yet been transmitted to the network.
138 virtual uint64_t buffered_amount() const = 0; 135 virtual uint64_t buffered_amount() const = 0;
139 virtual void Close() = 0; 136 virtual void Close() = 0;
140 // Sends |data| to the remote peer. 137 // Sends |data| to the remote peer.
141 virtual bool Send(const DataBuffer& buffer) = 0; 138 virtual bool Send(const DataBuffer& buffer) = 0;
142 139
143 protected: 140 protected:
144 virtual ~DataChannelInterface() {} 141 virtual ~DataChannelInterface() {}
145 }; 142 };
146 143
147 } // namespace webrtc 144 } // namespace webrtc
148 145
149 #endif // WEBRTC_API_DATACHANNELINTERFACE_H_ 146 #endif // WEBRTC_API_DATACHANNELINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698