| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Result cancellation status interface to allow non-Blink webcrypto threads | 39 // Result cancellation status interface to allow non-Blink webcrypto threads |
| 40 // to query for status. | 40 // to query for status. |
| 41 class CryptoResultCancel : public ThreadSafeRefCounted<CryptoResultCancel> { | 41 class CryptoResultCancel : public ThreadSafeRefCounted<CryptoResultCancel> { |
| 42 public: | 42 public: |
| 43 virtual ~CryptoResultCancel() { } | 43 virtual ~CryptoResultCancel() { } |
| 44 | 44 |
| 45 virtual bool cancelled() const = 0; | 45 virtual bool cancelled() const = 0; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // Receives notification of completion of the crypto operation. | 48 // Receives notification of completion of the crypto operation. |
| 49 class CryptoResult : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<
CryptoResult> { | 49 class CryptoResult : public GarbageCollectedFinalized<CryptoResult> { |
| 50 public: | 50 public: |
| 51 virtual ~CryptoResult() { } | 51 virtual ~CryptoResult() { } |
| 52 | 52 |
| 53 virtual void completeWithError(WebCryptoErrorType, const WebString&) = 0; | 53 virtual void completeWithError(WebCryptoErrorType, const WebString&) = 0; |
| 54 virtual void completeWithBuffer(const void* bytes, unsigned bytesSize) = 0; | 54 virtual void completeWithBuffer(const void* bytes, unsigned bytesSize) = 0; |
| 55 virtual void completeWithJson(const char* utf8Data, unsigned length) = 0; | 55 virtual void completeWithJson(const char* utf8Data, unsigned length) = 0; |
| 56 virtual void completeWithBoolean(bool) = 0; | 56 virtual void completeWithBoolean(bool) = 0; |
| 57 virtual void completeWithKey(const WebCryptoKey&) = 0; | 57 virtual void completeWithKey(const WebCryptoKey&) = 0; |
| 58 virtual void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCry
ptoKey& privateKey) = 0; | 58 virtual void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCry
ptoKey& privateKey) = 0; |
| 59 | 59 |
| 60 DEFINE_INLINE_VIRTUAL_TRACE() { } | 60 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| 64 | 64 |
| 65 #endif // CryptoResult_h | 65 #endif // CryptoResult_h |
| OLD | NEW |