Index: third_party/WebKit/public/platform/WebRTCCertificate.h |
diff --git a/third_party/WebKit/Source/core/timing/PerformanceRenderTiming.h b/third_party/WebKit/public/platform/WebRTCCertificate.h |
similarity index 50% |
copy from third_party/WebKit/Source/core/timing/PerformanceRenderTiming.h |
copy to third_party/WebKit/public/platform/WebRTCCertificate.h |
index 4f8df46f5c3fedabed1e521774810660d5b6e270..112cb2451497cce01ffa09066291507b646c8548 100644 |
--- a/third_party/WebKit/Source/core/timing/PerformanceRenderTiming.h |
+++ b/third_party/WebKit/public/platform/WebRTCCertificate.h |
@@ -1,6 +1,5 @@ |
/* |
* Copyright (C) 2015 Google Inc. All rights reserved. |
- * Copyright (C) 2015 Intel Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -29,38 +28,48 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef PerformanceRenderTiming_h |
-#define PerformanceRenderTiming_h |
+#ifndef WebRTCCertificate_h |
+#define WebRTCCertificate_h |
-#include "core/timing/PerformanceEntry.h" |
-#include "platform/heap/Handle.h" |
-#include "wtf/Forward.h" |
-#include "wtf/text/WTFString.h" |
+#include "public/platform/WebRTCKeyType.h" |
+#include "wtf/Noncopyable.h" |
-namespace blink { |
+namespace rtc { |
+class RTCCertificate; |
+template<class T> |
+class scoped_refptr; |
+} |
-class Document; |
+namespace blink { |
-class PerformanceRenderTiming final : public PerformanceEntry { |
- DEFINE_WRAPPERTYPEINFO(); |
+// Interface defining what blink needs to know about certificates (abstracting away |
+// Chrome and WebRTC layer implementation details). You can create shallow copies of the |
+// 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 { |
+ WTF_MAKE_NONCOPYABLE(WebRTCCertificate); |
public: |
- static PerformanceRenderTiming* create(Document* requestingDocument, unsigned sourceFrame, double startTime, double finishTime) |
- { |
- return new PerformanceRenderTiming(requestingDocument, sourceFrame, startTime, finishTime); |
- } |
+ WebRTCCertificate() = default; |
+ virtual ~WebRTCCertificate() = default; |
- unsigned sourceFrame() 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; |
- DECLARE_VIRTUAL_TRACE(); |
+ virtual const WebRTCKeyType& keyType() const = 0; |
-private: |
- PerformanceRenderTiming(Document* requestingDocument, unsigned sourceFrame, double startTime, double finishTime); |
- ~PerformanceRenderTiming() override; |
+ // 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; |
- unsigned m_sourceFrame; |
- RefPtrWillBeMember<Document> m_requestingDocument; |
+ // Gets a raw pointer to a member value referencing the WebRTC layer version |
+ // 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; |
}; |
} // namespace blink |
-#endif // PerformanceRenderTiming_h |
+#endif // WebRTCCertificate_h |