Chromium Code Reviews| Index: public/web/WebScriptBindings.h |
| diff --git a/public/web/WebScriptBindings.h b/public/web/WebScriptBindings.h |
| index ef953b659e6aec6d284dcd47e659781e20ff94b1..64764fffca72a81eaa1685f9dd670e6720323a2d 100644 |
| --- a/public/web/WebScriptBindings.h |
| +++ b/public/web/WebScriptBindings.h |
| @@ -32,9 +32,11 @@ |
| #define WebScriptBindings_h |
| #include "../platform/WebCommon.h" |
| +#include "../platform/WebCryptoAlgorithmOperation.h" |
| namespace v8 { |
| class Isolate; |
| +class Object; |
| class String; |
| template <class T> class Handle; |
| template <class T> class Local; |
| @@ -43,6 +45,7 @@ template <class T> class Local; |
| namespace blink { |
| class WebString; |
| +class WebCryptoAlgorithm; |
| class WebScriptBindings { |
| public: |
| @@ -52,6 +55,16 @@ public: |
| // 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_EXPORT static WebCryptoAlgorithm normalizeCryptoAlgorithm(v8::Handle<v8::Object>, AlgorithmOperation, int*, WebString*, v8::Isolate*); |
|
jochen (gone - plz use gerrit)
2014/06/02 09:01:45
this should probably be in a WebCrypto header
als
pneubeck (no reviews)
2014/06/02 10:12:16
Instead of WebScriptBindings, should it be in a
p
pneubeck (no reviews)
2014/06/02 13:54:25
Done.
Moved to public/web/WebCryptoNormalize.h
|
| }; |
| } // namespace blink |