OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012, 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 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 |
11 * copyright notice, this list of conditions and the following disclaimer | 11 * copyright notice, this list of conditions and the following disclaimer |
12 * in the documentation and/or other materials provided with the | 12 * in the documentation and/or other materials provided with the |
13 * distribution. | 13 * distribution. |
14 * * Neither the name of Google Inc. nor the names of its | 14 * * Neither the name of Google Inc. nor the names of its |
15 * contributors may be used to endorse or promote products derived from | 15 * contributors may be used to endorse or promote products derived from |
16 * this software without specific prior written permission. | 16 * this software without specific prior written permission. |
17 * | 17 * |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 HTMLTemplateElement_h | 31 #ifndef WebRTCCertificate_h |
32 #define HTMLTemplateElement_h | 32 #define WebRTCCertificate_h |
33 | 33 |
34 #include "core/html/HTMLElement.h" | 34 #include "public/platform/WebRTCKeyParams.h" |
35 | |
36 namespace rtc { | |
37 class RTCCertificate; | |
38 template<class T> | |
39 class scoped_refptr; | |
40 } | |
35 | 41 |
36 namespace blink { | 42 namespace blink { |
37 | 43 |
38 class DocumentFragment; | 44 // Interface defining what blink needs to know about certificates (abstracting a way |
Ryan Sleevi
2015/10/10 04:04:48
comment nit: Shouldn't this be Blink?
hbos_chromium
2015/10/14 13:00:50
Done.
| |
39 class TemplateContentDocumentFragment; | 45 // Chromium and WebRTC layer implementation details). You can create shallow cop ies of the |
Ryan Sleevi
2015/10/10 04:04:48
This doesn't seem like proper grammar, nor in line
hbos_chromium
2015/10/14 13:00:50
Acknowledged.
| |
46 // WebRTCCertificate. When all copies are destroyed, the implementation-specific data must | |
47 // be freed. WebRTCCertificate objects thus act like references to the reference counted | |
48 // internal data. | |
49 class WebRTCCertificate { | |
50 public: | |
51 WebRTCCertificate() = default; | |
52 virtual ~WebRTCCertificate() = default; | |
40 | 53 |
41 class HTMLTemplateElement final : public HTMLElement { | 54 // Copies the WebRTCCertificate object without copying the underlying |
42 DEFINE_WRAPPERTYPEINFO(); | 55 // implementation-specific (WebRTC layer) certificate. When all copies are d estroyed |
43 public: | 56 // the underlying data is freed. |
44 DECLARE_NODE_FACTORY(HTMLTemplateElement); | 57 virtual WebRTCCertificate* shallowCopy() const = 0; |
45 ~HTMLTemplateElement() override; | |
46 DECLARE_VIRTUAL_TRACE(); | |
47 | 58 |
48 DocumentFragment* content() const; | 59 virtual const WebRTCKeyParams& keyParams() const = 0; |
60 | |
61 // The date and time after which the certificate should be considered | |
62 // invalid. Expressed in time since 1970-01-01T00:00:00Z in milliseconds. | |
63 virtual double expires() const = 0; | |
64 | |
65 // Gets a raw pointer to a member value referencing the WebRTC layer version | |
Guido Urdaneta
2015/10/08 11:13:03
s/Gets/Returns
hbos_chromium
2015/10/14 13:00:50
Done.
| |
66 // of the certificate. Using pointers because the blink layer does not have | |
67 // knowledge of the WebRTC class implementations. | |
68 virtual const rtc::scoped_refptr<rtc::RTCCertificate>* rtcCertificate() cons t = 0; | |
Guido Urdaneta
2015/10/08 11:13:03
What if you return constant ref instead of constan
hbos_chromium
2015/10/14 13:00:50
Done. Yeah that feels better!
| |
49 | 69 |
50 private: | 70 private: |
51 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override; | 71 WebRTCCertificate(const WebRTCCertificate&) = delete; |
52 void didMoveToNewDocument(Document& oldDocument) override; | 72 WebRTCCertificate& operator=(const WebRTCCertificate&) = delete; |
hbos_chromium
2015/10/06 15:56:35
The include of wtf/Noncopyable caused problems whe
| |
53 | |
54 explicit HTMLTemplateElement(Document&); | |
55 | |
56 mutable RefPtrWillBeMember<TemplateContentDocumentFragment> m_content; | |
57 }; | 73 }; |
58 | 74 |
59 } // namespace blink | 75 } // namespace blink |
60 | 76 |
61 #endif // HTMLTemplateElement_h | 77 #endif // WebRTCCertificate_h |
OLD | NEW |