summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h')
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h b/chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
index 313d8ee304d..6b038406b1d 100644
--- a/chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
+++ b/chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
@@ -33,33 +33,39 @@
#include "bindings/v8/ScriptPromise.h"
#include "bindings/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+#include "wtf/ArrayPiece.h"
#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
class Dictionary;
-class ExceptionState;
class Key;
-class SubtleCrypto : public ScriptWrappable, public RefCounted<SubtleCrypto> {
+class SubtleCrypto : public GarbageCollectedFinalized<SubtleCrypto>, public ScriptWrappable {
public:
- static PassRefPtr<SubtleCrypto> create() { return adoptRef(new SubtleCrypto()); }
+ static SubtleCrypto* create()
+ {
+ return new SubtleCrypto();
+ }
- ScriptPromise encrypt(const Dictionary&, Key*, ArrayBufferView* data, ExceptionState&);
- ScriptPromise decrypt(const Dictionary&, Key*, ArrayBufferView* data, ExceptionState&);
- ScriptPromise sign(const Dictionary&, Key*, ArrayBufferView* data, ExceptionState&);
+ ScriptPromise encrypt(ScriptState*, const Dictionary&, Key*, const ArrayPiece&);
+ ScriptPromise decrypt(ScriptState*, const Dictionary&, Key*, const ArrayPiece&);
+ ScriptPromise sign(ScriptState*, const Dictionary&, Key*, const ArrayPiece&);
// Note that this is not named "verify" because when compiling on Mac that expands to a macro and breaks.
- ScriptPromise verifySignature(const Dictionary&, Key*, ArrayBufferView* signature, ArrayBufferView* data, ExceptionState&);
- ScriptPromise digest(const Dictionary&, ArrayBufferView* data, ExceptionState&);
+ ScriptPromise verifySignature(ScriptState*, const Dictionary&, Key*, const ArrayPiece& signature, const ArrayPiece& data);
+ ScriptPromise digest(ScriptState*, const Dictionary&, const ArrayPiece& data);
- ScriptPromise generateKey(const Dictionary&, bool extractable, const Vector<String>& keyUsages, ExceptionState&);
- ScriptPromise importKey(const String&, ArrayBufferView*, const Dictionary&, bool extractable, const Vector<String>& keyUsages, ExceptionState&);
- ScriptPromise exportKey(const String&, Key*, ExceptionState&);
+ ScriptPromise generateKey(ScriptState*, const Dictionary&, bool extractable, const Vector<String>& keyUsages);
+ ScriptPromise importKey(ScriptState*, const String&, const ArrayPiece&, const Dictionary&, bool extractable, const Vector<String>& keyUsages);
+ ScriptPromise importKey(ScriptState*, const String&, const Dictionary&, const Dictionary&, bool extractable, const Vector<String>& keyUsages);
+ ScriptPromise exportKey(ScriptState*, const String&, Key*);
- ScriptPromise wrapKey(const String&, Key*, Key*, const Dictionary&, ExceptionState&);
- ScriptPromise unwrapKey(const String&, ArrayBufferView*, Key*, const Dictionary&, const Dictionary&, bool, const Vector<String>&, ExceptionState&);
+ ScriptPromise wrapKey(ScriptState*, const String&, Key*, Key*, const Dictionary&);
+ ScriptPromise unwrapKey(ScriptState*, const String&, const ArrayPiece&, Key*, const Dictionary&, const Dictionary&, bool, const Vector<String>&);
+
+ void trace(Visitor*) { }
private:
SubtleCrypto();