Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / shell / renderer / test_runner / mock_webrtc_dtmf_sender_handler.h
blobfb487103393113224be961b9f2e253285263a838
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDTMFSENDERHANDLER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDTMFSENDERHANDLER_H_
8 #include "base/basictypes.h"
9 #include "content/shell/renderer/test_runner/WebTask.h"
10 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
11 #include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h"
12 #include "third_party/WebKit/public/platform/WebString.h"
14 namespace content {
16 class WebTestDelegate;
18 class MockWebRTCDTMFSenderHandler : public blink::WebRTCDTMFSenderHandler {
19 public:
20 MockWebRTCDTMFSenderHandler(const blink::WebMediaStreamTrack& track,
21 WebTestDelegate* delegate);
23 // WebRTCDTMFSenderHandler related methods
24 virtual void setClient(blink::WebRTCDTMFSenderHandlerClient* client) OVERRIDE;
25 virtual blink::WebString currentToneBuffer() OVERRIDE;
26 virtual bool canInsertDTMF() OVERRIDE;
27 virtual bool insertDTMF(const blink::WebString& tones,
28 long duration,
29 long inter_tone_gap) OVERRIDE;
31 // WebTask related methods
32 WebTaskList* mutable_task_list() { return &task_list_; }
34 void ClearToneBuffer() { tone_buffer_.reset(); }
36 private:
37 MockWebRTCDTMFSenderHandler();
39 blink::WebRTCDTMFSenderHandlerClient* client_;
40 blink::WebMediaStreamTrack track_;
41 blink::WebString tone_buffer_;
42 WebTaskList task_list_;
43 WebTestDelegate* delegate_;
45 DISALLOW_COPY_AND_ASSIGN(MockWebRTCDTMFSenderHandler);
48 } // namespace content
50 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDTMFSENDERHANDLER_H_