| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer/media/rtc_dtmf_sender_handler.h" | 5 #include "content/renderer/media/rtc_dtmf_sender_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/thread_task_runner_handle.h" | |
| 15 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 | 16 |
| 17 using webrtc::DtmfSenderInterface; | 17 using webrtc::DtmfSenderInterface; |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 class RtcDtmfSenderHandler::Observer : | 21 class RtcDtmfSenderHandler::Observer : |
| 22 public base::RefCountedThreadSafe<Observer>, | 22 public base::RefCountedThreadSafe<Observer>, |
| 23 public webrtc::DtmfSenderObserverInterface { | 23 public webrtc::DtmfSenderObserverInterface { |
| 24 public: | 24 public: |
| 25 explicit Observer(const base::WeakPtr<RtcDtmfSenderHandler>& handler) | 25 explicit Observer(const base::WeakPtr<RtcDtmfSenderHandler>& handler) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void RtcDtmfSenderHandler::OnToneChange(const std::string& tone) { | 87 void RtcDtmfSenderHandler::OnToneChange(const std::string& tone) { |
| 88 if (!webkit_client_) { | 88 if (!webkit_client_) { |
| 89 LOG(ERROR) << "WebRTCDTMFSenderHandlerClient not set."; | 89 LOG(ERROR) << "WebRTCDTMFSenderHandlerClient not set."; |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 webkit_client_->didPlayTone(base::UTF8ToUTF16(tone)); | 92 webkit_client_->didPlayTone(base::UTF8ToUTF16(tone)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace content | 95 } // namespace content |
| 96 | 96 |
| OLD | NEW |