| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef MockWebRTCDTMFSenderHandler_h | 26 #ifndef MockWebRTCDTMFSenderHandler_h |
| 27 #define MockWebRTCDTMFSenderHandler_h | 27 #define MockWebRTCDTMFSenderHandler_h |
| 28 | 28 |
| 29 #include "TestCommon.h" | 29 #include "TestCommon.h" |
| 30 #include "public/platform/WebMediaStreamTrack.h" | 30 #include "public/platform/WebMediaStreamTrack.h" |
| 31 #include "public/platform/WebNonCopyable.h" |
| 31 #include "public/platform/WebRTCDTMFSenderHandler.h" | 32 #include "public/platform/WebRTCDTMFSenderHandler.h" |
| 32 #include "public/platform/WebString.h" | 33 #include "public/platform/WebString.h" |
| 33 #include "public/testing/WebTask.h" | 34 #include "public/testing/WebTask.h" |
| 34 | 35 |
| 35 namespace WebTestRunner { | 36 namespace WebTestRunner { |
| 36 | 37 |
| 37 class WebTestDelegate; | 38 class WebTestDelegate; |
| 38 | 39 |
| 39 class MockWebRTCDTMFSenderHandler : public WebKit::WebRTCDTMFSenderHandler { | 40 class MockWebRTCDTMFSenderHandler : public WebKit::WebRTCDTMFSenderHandler, publ
ic WebKit::WebNonCopyable { |
| 40 public: | 41 public: |
| 41 MockWebRTCDTMFSenderHandler(const WebKit::WebMediaStreamTrack&, WebTestDeleg
ate*); | 42 MockWebRTCDTMFSenderHandler(const WebKit::WebMediaStreamTrack&, WebTestDeleg
ate*); |
| 42 | 43 |
| 43 virtual void setClient(WebKit::WebRTCDTMFSenderHandlerClient*) OVERRIDE; | 44 virtual void setClient(WebKit::WebRTCDTMFSenderHandlerClient*) OVERRIDE; |
| 44 | 45 |
| 45 virtual WebKit::WebString currentToneBuffer() OVERRIDE; | 46 virtual WebKit::WebString currentToneBuffer() OVERRIDE; |
| 46 | 47 |
| 47 virtual bool canInsertDTMF() OVERRIDE; | 48 virtual bool canInsertDTMF() OVERRIDE; |
| 48 virtual bool insertDTMF(const WebKit::WebString& tones, long duration, long
interToneGap) OVERRIDE; | 49 virtual bool insertDTMF(const WebKit::WebString& tones, long duration, long
interToneGap) OVERRIDE; |
| 49 | 50 |
| 50 // WebTask related methods | 51 // WebTask related methods |
| 51 WebTaskList* taskList() { return &m_taskList; } | 52 WebTaskList* taskList() { return &m_taskList; } |
| 52 void clearToneBuffer() { m_toneBuffer.reset(); } | 53 void clearToneBuffer() { m_toneBuffer.reset(); } |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 MockWebRTCDTMFSenderHandler(); | 56 MockWebRTCDTMFSenderHandler(); |
| 56 | 57 |
| 57 WebKit::WebRTCDTMFSenderHandlerClient* m_client; | 58 WebKit::WebRTCDTMFSenderHandlerClient* m_client; |
| 58 WebKit::WebMediaStreamTrack m_track; | 59 WebKit::WebMediaStreamTrack m_track; |
| 59 WebKit::WebString m_toneBuffer; | 60 WebKit::WebString m_toneBuffer; |
| 60 WebTaskList m_taskList; | 61 WebTaskList m_taskList; |
| 61 WebTestDelegate* m_delegate; | 62 WebTestDelegate* m_delegate; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } | 65 } |
| 65 | 66 |
| 66 #endif // MockWebRTCDTMFSenderHandler_h | 67 #endif // MockWebRTCDTMFSenderHandler_h |
| OLD | NEW |