| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class CONTENT_EXPORT RtcDataChannelHandler | 23 class CONTENT_EXPORT RtcDataChannelHandler |
| 24 : NON_EXPORTED_BASE(public blink::WebRTCDataChannelHandler), | 24 : NON_EXPORTED_BASE(public blink::WebRTCDataChannelHandler), |
| 25 NON_EXPORTED_BASE(public webrtc::DataChannelObserver), | 25 NON_EXPORTED_BASE(public webrtc::DataChannelObserver), |
| 26 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 26 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 27 public: | 27 public: |
| 28 explicit RtcDataChannelHandler(webrtc::DataChannelInterface* channel); | 28 explicit RtcDataChannelHandler(webrtc::DataChannelInterface* channel); |
| 29 virtual ~RtcDataChannelHandler(); | 29 virtual ~RtcDataChannelHandler(); |
| 30 | 30 |
| 31 // blink::WebRTCDataChannelHandler implementation. | 31 // blink::WebRTCDataChannelHandler implementation. |
| 32 virtual void setClient( | 32 virtual void setClient( |
| 33 blink::WebRTCDataChannelHandlerClient* client) OVERRIDE; | 33 blink::WebRTCDataChannelHandlerClient* client) override; |
| 34 virtual blink::WebString label() OVERRIDE; | 34 virtual blink::WebString label() override; |
| 35 virtual bool isReliable() OVERRIDE; | 35 virtual bool isReliable() override; |
| 36 virtual bool ordered() const OVERRIDE; | 36 virtual bool ordered() const override; |
| 37 virtual unsigned short maxRetransmitTime() const OVERRIDE; | 37 virtual unsigned short maxRetransmitTime() const override; |
| 38 virtual unsigned short maxRetransmits() const OVERRIDE; | 38 virtual unsigned short maxRetransmits() const override; |
| 39 virtual blink::WebString protocol() const OVERRIDE; | 39 virtual blink::WebString protocol() const override; |
| 40 virtual bool negotiated() const OVERRIDE; | 40 virtual bool negotiated() const override; |
| 41 virtual unsigned short id() const OVERRIDE; | 41 virtual unsigned short id() const override; |
| 42 virtual unsigned long bufferedAmount() OVERRIDE; | 42 virtual unsigned long bufferedAmount() override; |
| 43 virtual bool sendStringData(const blink::WebString& data) OVERRIDE; | 43 virtual bool sendStringData(const blink::WebString& data) override; |
| 44 virtual bool sendRawData(const char* data, size_t length) OVERRIDE; | 44 virtual bool sendRawData(const char* data, size_t length) override; |
| 45 virtual void close() OVERRIDE; | 45 virtual void close() override; |
| 46 | 46 |
| 47 // webrtc::DataChannelObserver implementation. | 47 // webrtc::DataChannelObserver implementation. |
| 48 virtual void OnStateChange() OVERRIDE; | 48 virtual void OnStateChange() override; |
| 49 virtual void OnMessage(const webrtc::DataBuffer& buffer) OVERRIDE; | 49 virtual void OnMessage(const webrtc::DataBuffer& buffer) override; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 void RecordMessageSent(size_t num_bytes); | 52 void RecordMessageSent(size_t num_bytes); |
| 53 | 53 |
| 54 scoped_refptr<webrtc::DataChannelInterface> channel_; | 54 scoped_refptr<webrtc::DataChannelInterface> channel_; |
| 55 blink::WebRTCDataChannelHandlerClient* webkit_client_; | 55 blink::WebRTCDataChannelHandlerClient* webkit_client_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace content | 58 } // namespace content |
| 59 | 59 |
| 60 #endif // CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ | 60 #endif // CONTENT_RENDERER_MEDIA_RTC_DATA_CHANNEL_HANDLER_H_ |
| OLD | NEW |