| Index: Source/modules/crypto/CryptoOperation.h
|
| diff --git a/Source/modules/crypto/CryptoOperation.h b/Source/modules/crypto/CryptoOperation.h
|
| index b26974dd9d66ca0e49bb83757d9af6833406e7f9..f59a60b8eee3f8d68174985d55b8ac386699b2f8 100644
|
| --- a/Source/modules/crypto/CryptoOperation.h
|
| +++ b/Source/modules/crypto/CryptoOperation.h
|
| @@ -46,10 +46,10 @@ class ScriptPromiseResolver;
|
|
|
| typedef int ExceptionCode;
|
|
|
| -class CryptoOperation : public ScriptWrappable, public RefCounted<CryptoOperation> {
|
| +class CryptoOperation : public ScriptWrappable, public WebKit::WebCryptoOperationResult, public RefCounted<CryptoOperation> {
|
| public:
|
| ~CryptoOperation();
|
| - static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm&, WebKit::WebCryptoOperation*);
|
| + static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm&, ExceptionCode*);
|
|
|
| CryptoOperation* process(ArrayBuffer* data);
|
| CryptoOperation* process(ArrayBufferView* data);
|
| @@ -59,11 +59,17 @@ public:
|
|
|
| Algorithm* algorithm();
|
|
|
| -private:
|
| - class Result;
|
| - friend class Result;
|
| + // Implementation of WebKit::WebCryptoOperationResult.
|
| + virtual void initializationFailed() OVERRIDE;
|
| + virtual void initializationSucceded(WebKit::WebCryptoOperation*) OVERRIDE;
|
| + virtual void completeWithError() OVERRIDE;
|
| + virtual void completeWithArrayBuffer(const WebKit::WebArrayBuffer&) OVERRIDE;
|
|
|
| +private:
|
| enum State {
|
| + // Constructing the WebCryptoOperation.
|
| + Initializing,
|
| +
|
| // Accepting calls to process().
|
| Processing,
|
|
|
| @@ -77,7 +83,7 @@ private:
|
| Done,
|
| };
|
|
|
| - CryptoOperation(const WebKit::WebCryptoAlgorithm&, WebKit::WebCryptoOperation*);
|
| + CryptoOperation(const WebKit::WebCryptoAlgorithm&, ExceptionCode*);
|
|
|
| void process(const unsigned char*, size_t);
|
|
|
| @@ -94,7 +100,7 @@ private:
|
|
|
| RefPtr<ScriptPromiseResolver> m_promiseResolver;
|
|
|
| - OwnPtr<Result> m_result;
|
| + ExceptionCode* m_exceptionCode;
|
| };
|
|
|
| } // namespace WebCore
|
|
|