Chromium Code Reviews| Index: public/web/WebCryptoNormalize.h |
| diff --git a/public/web/WebScriptBindings.h b/public/web/WebCryptoNormalize.h |
| similarity index 68% |
| copy from public/web/WebScriptBindings.h |
| copy to public/web/WebCryptoNormalize.h |
| index ef953b659e6aec6d284dcd47e659781e20ff94b1..fc4096810d94c491283eba413e68289a9dfd1db0 100644 |
| --- a/public/web/WebScriptBindings.h |
| +++ b/public/web/WebCryptoNormalize.h |
| @@ -1,5 +1,5 @@ |
| /* |
| - * Copyright (C) 2013 Google Inc. All rights reserved. |
| + * Copyright (C) 2014 Google Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are |
| @@ -28,31 +28,32 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WebScriptBindings_h |
| -#define WebScriptBindings_h |
| +#ifndef WebCryptoNormalize_h |
| +#define WebCryptoNormalize_h |
| #include "../platform/WebCommon.h" |
| +#include "public/platform/WebCryptoAlgorithm.h" |
|
jochen (gone - plz use gerrit)
2014/06/06 06:58:22
../platform
pneubeck (no reviews)
2014/06/06 09:17:09
Done.
|
| + |
| namespace v8 { |
| class Isolate; |
| -class String; |
| +class Object; |
| template <class T> class Handle; |
| -template <class T> class Local; |
| } |
| namespace blink { |
| class WebString; |
| -class WebScriptBindings { |
| -public: |
| - // Efficiently converts a WebString to a v8::String. The caller must have |
| - // a HandleScope to guard the result's lifetime. |
| - BLINK_EXPORT static v8::Local<v8::String> toV8String(const WebString&, v8::Isolate*); |
| - |
| - // You can use v8::Value::toString() to get a v8::String, but remember to wrap that in a v8::TryCatch. |
| - BLINK_EXPORT static WebString toWebString(v8::Handle<v8::String>); |
| -}; |
| +// Converts a javascript Dictionary to a WebCryptoAlgorithm object. |
| +// |
| +// This corresponds with "normalizing" [1] the algorithm, and then validating |
| +// the expected parameters for the algorithm/operation combination. |
| +// |
| +// On failure returns an null WebCryptoAlgorithm, sets the int to the ExceptionCode and the WebString to a (non-localized) debug string. |
| +// |
| +// [1] http://www.w3.org/TR/WebCryptoAPI/#algorithm-normalizing-rules |
| +BLINK_PLATFORM_EXPORT WebCryptoAlgorithm normalizeCryptoAlgorithm(v8::Handle<v8::Object>, WebCryptoOperation, int* exceptionCode, WebString* errorDetails, v8::Isolate*); |
|
jochen (gone - plz use gerrit)
2014/06/06 06:58:23
should be BLINK_EXPORT
pneubeck (no reviews)
2014/06/06 09:17:09
Done.
|
| } // namespace blink |