summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/Crypto.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/page/Crypto.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/page/Crypto.h')
-rw-r--r--Source/WebCore/page/Crypto.h32
1 files changed, 14 insertions, 18 deletions
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 <wtf/Forward.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#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<Crypto> {
public:
- static PassRefPtr<Crypto> create(Document& document) { return adoptRef(new Crypto(document)); }
+ static Ref<Crypto> create(ScriptExecutionContext& context) { return adoptRef(*new Crypto(context)); }
virtual ~Crypto();
- Document* document() const;
-
- void getRandomValues(JSC::ArrayBufferView*, ExceptionCode&);
+ ExceptionOr<void> getRandomValues(JSC::ArrayBufferView&);
#if ENABLE(SUBTLE_CRYPTO)
- SubtleCrypto* subtle();
+ SubtleCrypto& subtle();
+
+ // Will be deprecated.
+ ExceptionOr<WebKitSubtleCrypto&> webkitSubtle();
#endif
private:
- Crypto(Document&);
+ Crypto(ScriptExecutionContext&);
#if ENABLE(SUBTLE_CRYPTO)
- RefPtr<SubtleCrypto> m_subtle;
+ Ref<SubtleCrypto> m_subtle;
+
+ // Will be deprecated.
+ RefPtr<WebKitSubtleCrypto> m_webkitSubtle;
#endif
};
}
-
-#endif