From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/page/Crypto.h | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'Source/WebCore/page/Crypto.h') diff --git a/Source/WebCore/page/Crypto.h b/Source/WebCore/page/Crypto.h index 94eab5678..9b480e054 100644 --- a/Source/WebCore/page/Crypto.h +++ b/Source/WebCore/page/Crypto.h @@ -27,14 +27,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Crypto_h -#define Crypto_h +#pragma once #include "ContextDestructionObserver.h" -#include -#include -#include -#include +#include "ExceptionOr.h" namespace JSC { class ArrayBufferView; @@ -42,32 +38,32 @@ class ArrayBufferView; namespace WebCore { -typedef int ExceptionCode; - -class Document; class SubtleCrypto; +class WebKitSubtleCrypto; class Crypto : public ContextDestructionObserver, public RefCounted { public: - static PassRefPtr create(Document& document) { return adoptRef(new Crypto(document)); } + static Ref create(ScriptExecutionContext& context) { return adoptRef(*new Crypto(context)); } virtual ~Crypto(); - Document* document() const; - - void getRandomValues(JSC::ArrayBufferView*, ExceptionCode&); + ExceptionOr getRandomValues(JSC::ArrayBufferView&); #if ENABLE(SUBTLE_CRYPTO) - SubtleCrypto* subtle(); + SubtleCrypto& subtle(); + + // Will be deprecated. + ExceptionOr webkitSubtle(); #endif private: - Crypto(Document&); + Crypto(ScriptExecutionContext&); #if ENABLE(SUBTLE_CRYPTO) - RefPtr m_subtle; + Ref m_subtle; + + // Will be deprecated. + RefPtr m_webkitSubtle; #endif }; } - -#endif -- cgit v1.2.1