| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 14 matching lines...) Expand all Loading... |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 | 26 |
| 27 #include "core/platform/mediastream/RTCDataChannelHandler.h" | 27 #include "core/platform/mediastream/RTCDataChannelHandler.h" |
| 28 | 28 |
| 29 #include "core/platform/mediastream/RTCDataChannelHandlerClient.h" | 29 #include "core/platform/mediastream/RTCDataChannelHandlerClient.h" |
| 30 #include "public/platform/WebRTCDataChannelHandler.h" | 30 #include "public/platform/WebRTCDataChannelHandler.h" |
| 31 #include "wtf/PassOwnPtr.h" | 31 #include "wtf/PassOwnPtr.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 PassOwnPtr<RTCDataChannelHandler> RTCDataChannelHandler::create(WebKit::WebRTCDa
taChannelHandler* webHandler) | 35 PassOwnPtr<RTCDataChannelHandler> RTCDataChannelHandler::create(blink::WebRTCDat
aChannelHandler* webHandler) |
| 36 { | 36 { |
| 37 return adoptPtr(new RTCDataChannelHandler(webHandler)); | 37 return adoptPtr(new RTCDataChannelHandler(webHandler)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 RTCDataChannelHandler::RTCDataChannelHandler(WebKit::WebRTCDataChannelHandler* w
ebHandler) | 40 RTCDataChannelHandler::RTCDataChannelHandler(blink::WebRTCDataChannelHandler* we
bHandler) |
| 41 : m_webHandler(adoptPtr(webHandler)) | 41 : m_webHandler(adoptPtr(webHandler)) |
| 42 , m_client(0) | 42 , m_client(0) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 RTCDataChannelHandler::~RTCDataChannelHandler() | 46 RTCDataChannelHandler::~RTCDataChannelHandler() |
| 47 { | 47 { |
| 48 } | 48 } |
| 49 | 49 |
| 50 void RTCDataChannelHandler::setClient(RTCDataChannelHandlerClient* client) | 50 void RTCDataChannelHandler::setClient(RTCDataChannelHandlerClient* client) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 { | 112 { |
| 113 m_webHandler->close(); | 113 m_webHandler->close(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void RTCDataChannelHandler::didChangeReadyState(WebRTCDataChannelHandlerClient::
ReadyState state) const | 116 void RTCDataChannelHandler::didChangeReadyState(WebRTCDataChannelHandlerClient::
ReadyState state) const |
| 117 { | 117 { |
| 118 if (m_client) | 118 if (m_client) |
| 119 m_client->didChangeReadyState(static_cast<RTCDataChannelHandlerClient::R
eadyState>(state)); | 119 m_client->didChangeReadyState(static_cast<RTCDataChannelHandlerClient::R
eadyState>(state)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void RTCDataChannelHandler::didReceiveStringData(const WebKit::WebString& data)
const | 122 void RTCDataChannelHandler::didReceiveStringData(const blink::WebString& data) c
onst |
| 123 { | 123 { |
| 124 if (m_client) | 124 if (m_client) |
| 125 m_client->didReceiveStringData(data); | 125 m_client->didReceiveStringData(data); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void RTCDataChannelHandler::didReceiveRawData(const char* data, size_t size) con
st | 128 void RTCDataChannelHandler::didReceiveRawData(const char* data, size_t size) con
st |
| 129 { | 129 { |
| 130 if (m_client) | 130 if (m_client) |
| 131 m_client->didReceiveRawData(data, size); | 131 m_client->didReceiveRawData(data, size); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void RTCDataChannelHandler::didDetectError() const | 134 void RTCDataChannelHandler::didDetectError() const |
| 135 { | 135 { |
| 136 if (m_client) | 136 if (m_client) |
| 137 m_client->didDetectError(); | 137 m_client->didDetectError(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace WebCore | 140 } // namespace WebCore |
| OLD | NEW |