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

Unified Diff: Source/modules/mediastream/RTCDataChannel.h

Issue 1171553002: Initial implementation of onbufferedamountlow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove reference to file that no longer exists Created 5 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/modules/mediastream/RTCDataChannel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/RTCDataChannel.h
diff --git a/Source/modules/mediastream/RTCDataChannel.h b/Source/modules/mediastream/RTCDataChannel.h
index f26aed0e530ecc4e7935f57429b8319bb4f05dd0..1ce3ef0f5a1970d1947eb4e9c1d3ac528797ed95 100644
--- a/Source/modules/mediastream/RTCDataChannel.h
+++ b/Source/modules/mediastream/RTCDataChannel.h
@@ -42,7 +42,7 @@ class WebRTCDataChannelHandler;
class WebRTCPeerConnectionHandler;
struct WebRTCDataChannelInit;
-class RTCDataChannel final
+class MODULES_EXPORT RTCDataChannel final
: public RefCountedGarbageCollectedEventTargetWithInlineData<RTCDataChannel>
, public WebRTCDataChannelHandlerClient {
REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCDataChannel);
@@ -68,6 +68,9 @@ public:
String readyState() const;
unsigned bufferedAmount() const;
+ unsigned bufferedAmountLowThreshold() const;
+ void setBufferedAmountLowThreshold(unsigned);
+
String binaryType() const;
void setBinaryType(const String&, ExceptionState&);
@@ -79,6 +82,7 @@ public:
void close();
DEFINE_ATTRIBUTE_EVENT_LISTENER(open);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(bufferedamountlow);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
@@ -97,6 +101,7 @@ public:
// WebRTCDataChannelHandlerClient
void didChangeReadyState(WebRTCDataChannelHandlerClient::ReadyState) override;
+ void didDecreaseBufferedAmount(unsigned) override;
void didReceiveStringData(const WebString&) override;
void didReceiveRawData(const char*, size_t) override;
void didDetectError() override;
@@ -125,6 +130,11 @@ private:
WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents;
WeakMember<RTCPeerConnection> m_connection;
+
+ unsigned m_bufferedAmountLowThreshold;
+
+ // TODO(tkent): Use FRIEND_TEST macro provided by gtest_prod.h
+ friend class RTCDataChannelTest_BufferedAmountLow_Test; // NOLINT
};
} // namespace blink
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/modules/mediastream/RTCDataChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698