Index: public/web/WebCryptoNormalize.h |
diff --git a/public/web/WebArrayBufferConverter.h b/public/web/WebCryptoNormalize.h |
similarity index 69% |
copy from public/web/WebArrayBufferConverter.h |
copy to public/web/WebCryptoNormalize.h |
index 5dc0d010c655ca3dd2d4246b9ffaf39b77887dda..16ad8042b946015361b15ad4516b7e19ed4a35a8 100644 |
--- a/public/web/WebArrayBufferConverter.h |
+++ b/public/web/WebCryptoNormalize.h |
@@ -28,30 +28,34 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WebArrayBufferConverter_h |
-#define WebArrayBufferConverter_h |
+#ifndef WebCryptoNormalize_h |
+#define WebCryptoNormalize_h |
-#include "public/platform/WebArrayBuffer.h" |
+#include "../platform/WebCommon.h" |
+ |
+#include "../platform/WebCryptoAlgorithm.h" |
namespace v8 { |
class Isolate; |
class Object; |
-class Value; |
template <class T> class Handle; |
} |
namespace blink { |
-class WebArrayBufferConverter { |
-public: |
- // FIXME: remove these two APIs which doesn't take either context or |
- // isolate as their parameters after the embedder side is fixed. |
- BLINK_EXPORT static v8::Handle<v8::Value> toV8Value(WebArrayBuffer*); |
- BLINK_EXPORT static WebArrayBuffer* createFromV8Value(v8::Handle<v8::Value>); |
- BLINK_EXPORT static v8::Handle<v8::Value> toV8Value(WebArrayBuffer*, v8::Handle<v8::Object>, v8::Isolate*); |
- BLINK_EXPORT static WebArrayBuffer* createFromV8Value(v8::Handle<v8::Value>, v8::Isolate*); |
-}; |
+class WebString; |
+ |
+// Converts a javascript Dictionary to a WebCryptoAlgorithm object. |
abarth-chromium
2014/06/06 17:12:48
javascript -> JavaScript
|
+// |
+// 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 WebCryptoAlgorithm normalizeCryptoAlgorithm(v8::Handle<v8::Object>, WebCryptoOperation, int* exceptionCode, WebString* errorDetails, v8::Isolate*); |
} // namespace blink |
-#endif // WebArrayBufferConverter_h |
+#endif |