OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_data_channel_handler.h" | 5 #include "content/renderer/media/rtc_data_channel_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 RtcDataChannelHandler::RtcDataChannelHandler( | 14 RtcDataChannelHandler::RtcDataChannelHandler( |
15 webrtc::DataChannelInterface* channel) | 15 webrtc::DataChannelInterface* channel) |
16 : channel_(channel), | 16 : channel_(channel), |
17 webkit_client_(NULL) { | 17 webkit_client_(NULL) { |
18 DVLOG(1) << "::ctor"; | 18 DVLOG(1) << "::ctor"; |
19 channel_->RegisterObserver(this); | 19 channel_->RegisterObserver(this); |
20 } | 20 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 string16 utf16; | 99 string16 utf16; |
100 if (!UTF8ToUTF16(buffer.data.data(), buffer.data.length(), &utf16)) { | 100 if (!UTF8ToUTF16(buffer.data.data(), buffer.data.length(), &utf16)) { |
101 LOG(ERROR) << "Failed convert received data to UTF16"; | 101 LOG(ERROR) << "Failed convert received data to UTF16"; |
102 return; | 102 return; |
103 } | 103 } |
104 webkit_client_->didReceiveStringData(utf16); | 104 webkit_client_->didReceiveStringData(utf16); |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
108 } // namespace content | 108 } // namespace content |
OLD | NEW |