#ifndef CONTENT_RENDERER_MEDIA_RTC_DTMF_SENDER_HANDLER_H_
#define CONTENT_RENDERER_MEDIA_RTC_DTMF_SENDER_HANDLER_H_
#include <string>
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h"
#include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h"
#include "third_party/libjingle/source/talk/app/webrtc/dtmfsenderinterface.h"
namespace content {
class CONTENT_EXPORT RtcDtmfSenderHandler
    : NON_EXPORTED_BASE(public blink::WebRTCDTMFSenderHandler),
      NON_EXPORTED_BASE(public webrtc::DtmfSenderObserverInterface),
      NON_EXPORTED_BASE(public base::NonThreadSafe) {
 public:
  explicit RtcDtmfSenderHandler(webrtc::DtmfSenderInterface* dtmf_sender);
  virtual ~RtcDtmfSenderHandler();
  
  virtual void setClient(
      blink::WebRTCDTMFSenderHandlerClient* client) OVERRIDE;
  virtual blink::WebString currentToneBuffer() OVERRIDE;
  virtual bool canInsertDTMF() OVERRIDE;
  virtual bool insertDTMF(const blink::WebString& tones, long duration,
                          long interToneGap) OVERRIDE;
  
  virtual void OnToneChange(const std::string& tone) OVERRIDE;
 private:
  scoped_refptr<webrtc::DtmfSenderInterface> dtmf_sender_;
  blink::WebRTCDTMFSenderHandlerClient* webkit_client_;
};
}  
#endif