Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: third_party/WebKit/public/platform/WebRTCCertificate.h

Issue 1373023002: RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make trybots compile (WebRTCCertificate not including wtf/Noncopyable) Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/WebRTCCertificate.h
diff --git a/third_party/WebKit/Source/core/html/HTMLTemplateElement.h b/third_party/WebKit/public/platform/WebRTCCertificate.h
similarity index 50%
copy from third_party/WebKit/Source/core/html/HTMLTemplateElement.h
copy to third_party/WebKit/public/platform/WebRTCCertificate.h
index 2185690e77c2ac7d4bbed3e3bda29d3594ede026..2a43d66486b00f014c0e29794cd5c0ae1926c44f 100644
--- a/third_party/WebKit/Source/core/html/HTMLTemplateElement.h
+++ b/third_party/WebKit/public/platform/WebRTCCertificate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
+ * Copyright (C) 2015 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,34 +28,50 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLTemplateElement_h
-#define HTMLTemplateElement_h
+#ifndef WebRTCCertificate_h
+#define WebRTCCertificate_h
-#include "core/html/HTMLElement.h"
+#include "public/platform/WebRTCKeyParams.h"
-namespace blink {
+namespace rtc {
+class RTCCertificate;
+template<class T>
+class scoped_refptr;
+}
-class DocumentFragment;
-class TemplateContentDocumentFragment;
+namespace blink {
-class HTMLTemplateElement final : public HTMLElement {
- DEFINE_WRAPPERTYPEINFO();
+// Interface defining what blink needs to know about certificates (abstracting away
Ryan Sleevi 2015/10/10 04:04:48 comment nit: Shouldn't this be Blink?
hbos_chromium 2015/10/14 13:00:50 Done.
+// Chromium and WebRTC layer implementation details). You can create shallow copies 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.
+// WebRTCCertificate. When all copies are destroyed, the implementation-specific data must
+// be freed. WebRTCCertificate objects thus act like references to the reference counted
+// internal data.
+class WebRTCCertificate {
public:
- DECLARE_NODE_FACTORY(HTMLTemplateElement);
- ~HTMLTemplateElement() override;
- DECLARE_VIRTUAL_TRACE();
+ WebRTCCertificate() = default;
+ virtual ~WebRTCCertificate() = default;
- DocumentFragment* content() const;
+ // Copies the WebRTCCertificate object without copying the underlying
+ // implementation-specific (WebRTC layer) certificate. When all copies are destroyed
+ // the underlying data is freed.
+ virtual WebRTCCertificate* shallowCopy() const = 0;
-private:
- PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override;
- void didMoveToNewDocument(Document& oldDocument) override;
+ virtual const WebRTCKeyParams& keyParams() const = 0;
- explicit HTMLTemplateElement(Document&);
+ // The date and time after which the certificate should be considered
+ // invalid. Expressed in time since 1970-01-01T00:00:00Z in milliseconds.
+ virtual double expires() const = 0;
- mutable RefPtrWillBeMember<TemplateContentDocumentFragment> m_content;
+ // 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.
+ // of the certificate. Using pointers because the blink layer does not have
+ // knowledge of the WebRTC class implementations.
+ virtual const rtc::scoped_refptr<rtc::RTCCertificate>* rtcCertificate() const = 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!
+
+private:
+ WebRTCCertificate(const WebRTCCertificate&) = delete;
+ WebRTCCertificate& operator=(const WebRTCCertificate&) = delete;
hbos_chromium 2015/10/06 15:56:35 The include of wtf/Noncopyable caused problems whe
};
} // namespace blink
-#endif // HTMLTemplateElement_h
+#endif // WebRTCCertificate_h

Powered by Google App Engine
This is Rietveld 408576698