OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
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 #ifndef RTCCertificate_h | 31 #ifndef RTCCertificate_h |
32 #define RTCCertificate_h | 32 #define RTCCertificate_h |
33 | 33 |
34 #include <memory> | 34 #include <memory> |
| 35 |
35 #include "core/dom/DOMTimeStamp.h" | 36 #include "core/dom/DOMTimeStamp.h" |
36 #include "modules/ModulesExport.h" | 37 #include "modules/ModulesExport.h" |
| 38 #include "modules/peerconnection/RTCDtlsFingerprint.h" |
37 #include "platform/bindings/ScriptWrappable.h" | 39 #include "platform/bindings/ScriptWrappable.h" |
38 #include "platform/heap/GarbageCollected.h" | 40 #include "platform/heap/GarbageCollected.h" |
| 41 #include "platform/wtf/Vector.h" |
| 42 #include "platform/wtf/text/WTFString.h" |
39 #include "public/platform/WebRTCCertificate.h" | 43 #include "public/platform/WebRTCCertificate.h" |
40 | 44 |
41 namespace blink { | 45 namespace blink { |
42 | 46 |
43 class MODULES_EXPORT RTCCertificate final | 47 class MODULES_EXPORT RTCCertificate final |
44 : public GarbageCollectedFinalized<RTCCertificate>, | 48 : public GarbageCollectedFinalized<RTCCertificate>, |
45 public ScriptWrappable { | 49 public ScriptWrappable { |
46 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
47 | 51 |
48 public: | 52 public: |
49 // Takes ownership of the certificate. | 53 // Takes ownership of the certificate. |
50 RTCCertificate(std::unique_ptr<WebRTCCertificate>); | 54 RTCCertificate(std::unique_ptr<WebRTCCertificate>); |
51 | 55 |
52 // Returns a new WebRTCCertificate shallow copy. | 56 // Returns a new WebRTCCertificate shallow copy. |
53 std::unique_ptr<WebRTCCertificate> CertificateShallowCopy() const; | 57 std::unique_ptr<WebRTCCertificate> CertificateShallowCopy() const; |
54 const WebRTCCertificate& Certificate() const { return *certificate_; } | 58 const WebRTCCertificate& Certificate() const { return *certificate_; } |
55 | 59 |
56 DEFINE_INLINE_TRACE() {} | 60 DEFINE_INLINE_TRACE() {} |
57 | 61 |
58 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z. | 62 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z. |
59 DOMTimeStamp expires() const; | 63 DOMTimeStamp expires() const; |
| 64 HeapVector<RTCDtlsFingerprint> getFingerprints(); |
60 | 65 |
61 private: | 66 private: |
62 std::unique_ptr<WebRTCCertificate> certificate_; | 67 std::unique_ptr<WebRTCCertificate> certificate_; |
63 }; | 68 }; |
64 | 69 |
65 } // namespace blink | 70 } // namespace blink |
66 | 71 |
67 #endif // RTCCertificate_h | 72 #endif // RTCCertificate_h |
OLD | NEW |