diff options
Diffstat (limited to 'Source/WebCore/crypto/CryptoKeyData.h')
-rw-r--r-- | Source/WebCore/crypto/CryptoKeyData.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebCore/crypto/CryptoKeyData.h b/Source/WebCore/crypto/CryptoKeyData.h index 30e166b25..2c2adbcd5 100644 --- a/Source/WebCore/crypto/CryptoKeyData.h +++ b/Source/WebCore/crypto/CryptoKeyData.h @@ -23,13 +23,13 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CryptoKeyData_h -#define CryptoKeyData_h - -#include <wtf/Noncopyable.h> +#pragma once #if ENABLE(SUBTLE_CRYPTO) +#include <wtf/Noncopyable.h> +#include <wtf/TypeCasts.h> + namespace WebCore { class CryptoKeyData { @@ -52,10 +52,11 @@ private: Format m_format; }; -#define CRYPTO_KEY_DATA_CASTS(ToClassName) \ - TYPE_CASTS_BASE(ToClassName, CryptoKeyData, keyData, WebCore::is##ToClassName(*keyData), WebCore::is##ToClassName(keyData)) - } // namespace WebCore +#define SPECIALIZE_TYPE_TRAITS_CRYPTO_KEY_DATA(ToClassName, Format) \ +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToClassName) \ + static bool isType(const WebCore::CryptoKeyData& keyData) { return keyData.format() == WebCore::Format; } \ +SPECIALIZE_TYPE_TRAITS_END() + #endif // ENABLE(SUBTLE_CRYPTO) -#endif // CryptoKeyData_h |