| 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 21 matching lines...) Expand all Loading... |
| 32 #define WebCrypto_h | 32 #define WebCrypto_h |
| 33 | 33 |
| 34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
| 35 #include "WebCryptoAlgorithm.h" | 35 #include "WebCryptoAlgorithm.h" |
| 36 #include "WebCryptoKey.h" | 36 #include "WebCryptoKey.h" |
| 37 #include "WebPrivatePtr.h" | 37 #include "WebPrivatePtr.h" |
| 38 #include "WebString.h" | 38 #include "WebString.h" |
| 39 #include "WebVector.h" | 39 #include "WebVector.h" |
| 40 | 40 |
| 41 #if INSIDE_BLINK | 41 #if INSIDE_BLINK |
| 42 namespace WTF { template <typename T> class PassRefPtr; } | 42 #include "platform/heap/Heap.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class CryptoResult; | 47 class CryptoResult; |
| 48 class WebString; | 48 class WebString; |
| 49 | 49 |
| 50 enum WebCryptoErrorType { | 50 enum WebCryptoErrorType { |
| 51 WebCryptoErrorTypeType, | 51 WebCryptoErrorTypeType, |
| 52 WebCryptoErrorTypeNotSupported, | 52 WebCryptoErrorTypeNotSupported, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 BLINK_PLATFORM_EXPORT void completeWithJson(const char* utf8Data, unsigned l
ength); | 89 BLINK_PLATFORM_EXPORT void completeWithJson(const char* utf8Data, unsigned l
ength); |
| 90 BLINK_PLATFORM_EXPORT void completeWithBoolean(bool); | 90 BLINK_PLATFORM_EXPORT void completeWithBoolean(bool); |
| 91 BLINK_PLATFORM_EXPORT void completeWithKey(const WebCryptoKey&); | 91 BLINK_PLATFORM_EXPORT void completeWithKey(const WebCryptoKey&); |
| 92 BLINK_PLATFORM_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey
, const WebCryptoKey& privateKey); | 92 BLINK_PLATFORM_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey
, const WebCryptoKey& privateKey); |
| 93 | 93 |
| 94 // Returns true if the underlying operation was cancelled. | 94 // Returns true if the underlying operation was cancelled. |
| 95 // This method can be called from any thread. | 95 // This method can be called from any thread. |
| 96 BLINK_PLATFORM_EXPORT bool cancelled() const; | 96 BLINK_PLATFORM_EXPORT bool cancelled() const; |
| 97 | 97 |
| 98 #if INSIDE_BLINK | 98 #if INSIDE_BLINK |
| 99 BLINK_PLATFORM_EXPORT explicit WebCryptoResult(const WTF::PassRefPtr<CryptoR
esult>&); | 99 BLINK_PLATFORM_EXPORT explicit WebCryptoResult(const PassRefPtrWillBeRawPtr<
CryptoResult>&); |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 BLINK_PLATFORM_EXPORT void reset(); | 103 BLINK_PLATFORM_EXPORT void reset(); |
| 104 BLINK_PLATFORM_EXPORT void assign(const WebCryptoResult&); | 104 BLINK_PLATFORM_EXPORT void assign(const WebCryptoResult&); |
| 105 | 105 |
| 106 WebPrivatePtr<CryptoResult> m_impl; | 106 WebPrivatePtr<CryptoResult> m_impl; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 class WebCryptoDigestor { | 109 class WebCryptoDigestor { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // Returns true on success. | 267 // Returns true on success. |
| 268 virtual bool serializeKeyForClone(const WebCryptoKey&, WebVector<unsigned ch
ar>&) { return false; } | 268 virtual bool serializeKeyForClone(const WebCryptoKey&, WebVector<unsigned ch
ar>&) { return false; } |
| 269 | 269 |
| 270 protected: | 270 protected: |
| 271 virtual ~WebCrypto() { } | 271 virtual ~WebCrypto() { } |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 } // namespace blink | 274 } // namespace blink |
| 275 | 275 |
| 276 #endif // WebCrypto_h | 276 #endif // WebCrypto_h |
| OLD | NEW |