| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "modules/mediastream/RTCIceCandidate.h" | 33 #include "modules/mediastream/RTCIceCandidate.h" |
| 34 | 34 |
| 35 #include "bindings/v8/Dictionary.h" | 35 #include "bindings/v8/Dictionary.h" |
| 36 #include "bindings/v8/ExceptionState.h" | 36 #include "bindings/v8/ExceptionState.h" |
| 37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
| 38 #include "public/platform/WebRTCICECandidate.h" | |
| 39 | 38 |
| 40 namespace WebCore { | 39 namespace WebCore { |
| 41 | 40 |
| 42 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary
, ExceptionState& es) | 41 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary
, ExceptionState& es) |
| 43 { | 42 { |
| 44 String candidate; | 43 String candidate; |
| 45 bool ok = dictionary.get("candidate", candidate); | 44 bool ok = dictionary.get("candidate", candidate); |
| 46 if (!ok || !candidate.length()) { | 45 if (!ok || !candidate.length()) { |
| 47 es.throwUninformativeAndGenericDOMException(TypeMismatchError); | 46 es.throwUninformativeAndGenericDOMException(TypeMismatchError); |
| 48 return 0; | 47 return 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 { | 81 { |
| 83 return m_webCandidate.sdpMLineIndex(); | 82 return m_webCandidate.sdpMLineIndex(); |
| 84 } | 83 } |
| 85 | 84 |
| 86 blink::WebRTCICECandidate RTCIceCandidate::webCandidate() | 85 blink::WebRTCICECandidate RTCIceCandidate::webCandidate() |
| 87 { | 86 { |
| 88 return m_webCandidate; | 87 return m_webCandidate; |
| 89 } | 88 } |
| 90 | 89 |
| 91 } // namespace WebCore | 90 } // namespace WebCore |
| OLD | NEW |