| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/shell/renderer/test_runner/mock_webrtc_dtmf_sender_handler.h" | 5 #include "content/shell/renderer/test_runner/mock_webrtc_dtmf_sender_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 8 #include "content/shell/renderer/test_runner/web_test_delegate.h" |
| 9 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 9 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
| 10 #include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h" | 10 #include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h" |
| 11 | 11 |
| 12 using namespace blink; | 12 using namespace blink; |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class DTMFSenderToneTask : public WebMethodTask<MockWebRTCDTMFSenderHandler> { | 16 class DTMFSenderToneTask : public WebMethodTask<MockWebRTCDTMFSenderHandler> { |
| 17 public: | 17 public: |
| 18 DTMFSenderToneTask(MockWebRTCDTMFSenderHandler* object, | 18 DTMFSenderToneTask(MockWebRTCDTMFSenderHandler* object, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool MockWebRTCDTMFSenderHandler::insertDTMF(const WebString& tones, | 56 bool MockWebRTCDTMFSenderHandler::insertDTMF(const WebString& tones, |
| 57 long duration, | 57 long duration, |
| 58 long inter_tone_gap) { | 58 long inter_tone_gap) { |
| 59 DCHECK(client_); | 59 DCHECK(client_); |
| 60 if (!canInsertDTMF()) | 60 if (!canInsertDTMF()) |
| 61 return false; | 61 return false; |
| 62 | 62 |
| 63 tone_buffer_ = tones; | 63 tone_buffer_ = tones; |
| 64 delegate_->postTask(new DTMFSenderToneTask(this, client_)); | 64 delegate_->PostTask(new DTMFSenderToneTask(this, client_)); |
| 65 delegate_->postTask(new DTMFSenderToneTask(this, client_)); | 65 delegate_->PostTask(new DTMFSenderToneTask(this, client_)); |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace content | 69 } // namespace content |
| OLD | NEW |