| Index: third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
|
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.h b/third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
|
| similarity index 59%
|
| copy from third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.h
|
| copy to third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
|
| index e2466a537540c344e4f30221e94be45b7e620567..e5aff7b47f69ffa7fc902e17f02643f51cca1ac0 100644
|
| --- a/third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.h
|
| +++ b/third_party/WebKit/public/platform/WebRTCCertificateGenerator.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,35 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef PerformanceCompositeTiming_h
|
| -#define PerformanceCompositeTiming_h
|
| +#ifndef WebRTCCertificateGenerator_h
|
| +#define WebRTCCertificateGenerator_h
|
|
|
| -#include "core/timing/PerformanceEntry.h"
|
| -#include "platform/heap/Handle.h"
|
| -#include "wtf/Forward.h"
|
| -#include "wtf/text/WTFString.h"
|
| +#include "public/platform/WebCallbacks.h"
|
| +#include "public/platform/WebRTCCertificate.h"
|
| +#include "public/platform/WebRTCKeyParams.h"
|
| +#include "public/platform/WebURL.h"
|
|
|
| namespace blink {
|
|
|
| -class Document;
|
| -
|
| -class PerformanceCompositeTiming final : public PerformanceEntry {
|
| - DEFINE_WRAPPERTYPEINFO();
|
| +// Interface defining a class that can generate WebRTCCertificates asynchronously.
|
| +class WebRTCCertificateGenerator {
|
| public:
|
| - static PerformanceCompositeTiming* create(Document* requestingDocument, unsigned sourceFrame, double startTime)
|
| - {
|
| - return new PerformanceCompositeTiming(requestingDocument, sourceFrame, startTime);
|
| - }
|
| -
|
| - unsigned sourceFrame() const;
|
| -
|
| - DECLARE_VIRTUAL_TRACE();
|
| -
|
| -private:
|
| - PerformanceCompositeTiming(Document* requestingDocument, unsigned sourceFrame, double startTime);
|
| - ~PerformanceCompositeTiming() override;
|
| -
|
| - unsigned m_sourceFrame;
|
| - RefPtrWillBeMember<Document> m_requestingDocument;
|
| + virtual ~WebRTCCertificateGenerator() {}
|
| +
|
| + // Start generating a certificate asynchronously. The |observer| is invoked on the
|
| + // same thread that called generateCertificate when the operation is completed.
|
| + virtual void generateCertificate(
|
| + const WebRTCKeyParams&,
|
| + const WebURL&,
|
| + const WebURL& firstPartyForCookies,
|
| + WebCallbacks<WebRTCCertificate*, void>* observer) = 0;
|
| +
|
| + // Determines if the parameters should be considered valid for certificate generation.
|
| + // For example, if the number of bits of some parameter is too small or too large we
|
| + // may want to reject it for security or performance reasons.
|
| + virtual bool isValidKeyParams(const WebRTCKeyParams&) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // PerformanceCompositeTiming_h
|
| +#endif // WebRTCCertificateGenerator_h
|
|
|