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

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

Issue 1311853005: RTCCertificate and RTCPeerConnection.generateCertificate added to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Chromium implementation of Blink interfaces. Addressed comments. Created 5 years, 3 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/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
« no previous file with comments | « third_party/WebKit/public/platform/Platform.h ('k') | third_party/WebKit/public/platform/WebRTCCertificateGenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698