| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "public/platform/WebString.h" | 37 #include "public/platform/WebString.h" |
| 38 | 38 |
| 39 namespace WebKit { | 39 namespace WebKit { |
| 40 | 40 |
| 41 class WebRTCICECandidatePrivate : public RefCounted<WebRTCICECandidatePrivate> { | 41 class WebRTCICECandidatePrivate : public RefCounted<WebRTCICECandidatePrivate> { |
| 42 public: | 42 public: |
| 43 static PassRefPtr<WebRTCICECandidatePrivate> create(const WebString& candida
te, const WebString& sdpMid, unsigned short sdpMLineIndex) | 43 static PassRefPtr<WebRTCICECandidatePrivate> create(const WebString& candida
te, const WebString& sdpMid, unsigned short sdpMLineIndex) |
| 44 { | 44 { |
| 45 return adoptRef(new WebRTCICECandidatePrivate(candidate, sdpMid, sdpMLin
eIndex)); | 45 return adoptRef(new WebRTCICECandidatePrivate(candidate, sdpMid, sdpMLin
eIndex)); |
| 46 } | 46 } |
| 47 virtual ~WebRTCICECandidatePrivate(); | |
| 48 | 47 |
| 49 const WebString& candidate() const { return m_candidate; } | 48 const WebString& candidate() const { return m_candidate; } |
| 50 const WebString& sdpMid() const { return m_sdpMid; } | 49 const WebString& sdpMid() const { return m_sdpMid; } |
| 51 unsigned short sdpMLineIndex() const { return m_sdpMLineIndex; } | 50 unsigned short sdpMLineIndex() const { return m_sdpMLineIndex; } |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 WebRTCICECandidatePrivate(const WebString& candidate, const WebString& sdpMi
d, unsigned short sdpMLineIndex); | 53 WebRTCICECandidatePrivate(const WebString& candidate, const WebString& sdpMi
d, unsigned short sdpMLineIndex); |
| 55 | 54 |
| 56 WebString m_candidate; | 55 WebString m_candidate; |
| 57 WebString m_sdpMid; | 56 WebString m_sdpMid; |
| 58 unsigned short m_sdpMLineIndex; | 57 unsigned short m_sdpMLineIndex; |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 WebRTCICECandidatePrivate::WebRTCICECandidatePrivate(const WebString& candidate,
const WebString& sdpMid, unsigned short sdpMLineIndex) | 60 WebRTCICECandidatePrivate::WebRTCICECandidatePrivate(const WebString& candidate,
const WebString& sdpMid, unsigned short sdpMLineIndex) |
| 62 : m_candidate(candidate) | 61 : m_candidate(candidate) |
| 63 , m_sdpMid(sdpMid) | 62 , m_sdpMid(sdpMid) |
| 64 , m_sdpMLineIndex(sdpMLineIndex) | 63 , m_sdpMLineIndex(sdpMLineIndex) |
| 65 { | 64 { |
| 66 } | 65 } |
| 67 | 66 |
| 68 WebRTCICECandidatePrivate::~WebRTCICECandidatePrivate() | |
| 69 { | |
| 70 } | |
| 71 | |
| 72 void WebRTCICECandidate::assign(const WebRTCICECandidate& other) | 67 void WebRTCICECandidate::assign(const WebRTCICECandidate& other) |
| 73 { | 68 { |
| 74 m_private = other.m_private; | 69 m_private = other.m_private; |
| 75 } | 70 } |
| 76 | 71 |
| 77 void WebRTCICECandidate::reset() | 72 void WebRTCICECandidate::reset() |
| 78 { | 73 { |
| 79 m_private.reset(); | 74 m_private.reset(); |
| 80 } | 75 } |
| 81 | 76 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 96 return m_private->sdpMid(); | 91 return m_private->sdpMid(); |
| 97 } | 92 } |
| 98 | 93 |
| 99 unsigned short WebRTCICECandidate::sdpMLineIndex() const | 94 unsigned short WebRTCICECandidate::sdpMLineIndex() const |
| 100 { | 95 { |
| 101 ASSERT(!m_private.isNull()); | 96 ASSERT(!m_private.isNull()); |
| 102 return m_private->sdpMLineIndex(); | 97 return m_private->sdpMLineIndex(); |
| 103 } | 98 } |
| 104 | 99 |
| 105 } // namespace WebKit | 100 } // namespace WebKit |
| OLD | NEW |