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 25 matching lines...) Expand all Loading... |
36 #include "core/dom/ExceptionCode.h" | 36 #include "core/dom/ExceptionCode.h" |
37 #include "public/platform/WebRTCICECandidate.h" | 37 #include "public/platform/WebRTCICECandidate.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary
, ExceptionCode& ec) | 41 PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary
, ExceptionCode& ec) |
42 { | 42 { |
43 String candidate; | 43 String candidate; |
44 bool ok = dictionary.get("candidate", candidate); | 44 bool ok = dictionary.get("candidate", candidate); |
45 if (!ok || !candidate.length()) { | 45 if (!ok || !candidate.length()) { |
46 ec = TYPE_MISMATCH_ERR; | 46 ec = TypeMismatchError; |
47 return 0; | 47 return 0; |
48 } | 48 } |
49 | 49 |
50 String sdpMid; | 50 String sdpMid; |
51 dictionary.get("sdpMid", sdpMid); | 51 dictionary.get("sdpMid", sdpMid); |
52 | 52 |
53 unsigned short sdpMLineIndex = 0; | 53 unsigned short sdpMLineIndex = 0; |
54 dictionary.get("sdpMLineIndex", sdpMLineIndex); | 54 dictionary.get("sdpMLineIndex", sdpMLineIndex); |
55 | 55 |
56 return adoptRef(new RTCIceCandidate(WebKit::WebRTCICECandidate(candidate, sd
pMid, sdpMLineIndex))); | 56 return adoptRef(new RTCIceCandidate(WebKit::WebRTCICECandidate(candidate, sd
pMid, sdpMLineIndex))); |
(...skipping 28 matching lines...) Expand all Loading... |
85 { | 85 { |
86 return m_webCandidate.sdpMLineIndex(); | 86 return m_webCandidate.sdpMLineIndex(); |
87 } | 87 } |
88 | 88 |
89 WebKit::WebRTCICECandidate RTCIceCandidate::webCandidate() | 89 WebKit::WebRTCICECandidate RTCIceCandidate::webCandidate() |
90 { | 90 { |
91 return m_webCandidate; | 91 return m_webCandidate; |
92 } | 92 } |
93 | 93 |
94 } // namespace WebCore | 94 } // namespace WebCore |
OLD | NEW |