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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 class WebCryptoAlgorithmPrivate; | 68 class WebCryptoAlgorithmPrivate; |
69 | 69 |
70 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. | 70 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. |
71 // * Immutable | 71 // * Immutable |
72 // * Threadsafe | 72 // * Threadsafe |
73 // * Copiable (cheaply) | 73 // * Copiable (cheaply) |
74 class WebCryptoAlgorithm { | 74 class WebCryptoAlgorithm { |
75 public: | 75 public: |
76 #if WEBKIT_IMPLEMENTATION | 76 #if WEBKIT_IMPLEMENTATION |
77 WebCryptoAlgorithm() { } | 77 WebCryptoAlgorithm() { } |
78 WebCryptoAlgorithm(WebCryptoAlgorithmId, const char*, PassOwnPtr<WebCryptoAl
gorithmParams>); | 78 WebCryptoAlgorithm(WebCryptoAlgorithmId, const char* name, PassOwnPtr<WebCry
ptoAlgorithmParams>); |
79 #endif | 79 #endif |
80 | 80 |
| 81 WEBKIT_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryptoAlgori
thmId, const char* name, WebCryptoAlgorithmParams*); |
| 82 |
81 ~WebCryptoAlgorithm() { reset(); } | 83 ~WebCryptoAlgorithm() { reset(); } |
82 | 84 |
83 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); } | 85 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); } |
84 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other) | 86 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other) |
85 { | 87 { |
86 assign(other); | 88 assign(other); |
87 return *this; | 89 return *this; |
88 } | 90 } |
89 | 91 |
90 WEBKIT_EXPORT WebCryptoAlgorithmId id() const; | 92 WEBKIT_EXPORT WebCryptoAlgorithmId id() const; |
(...skipping 10 matching lines...) Expand all Loading... |
101 private: | 103 private: |
102 WEBKIT_EXPORT void assign(const WebCryptoAlgorithm& other); | 104 WEBKIT_EXPORT void assign(const WebCryptoAlgorithm& other); |
103 WEBKIT_EXPORT void reset(); | 105 WEBKIT_EXPORT void reset(); |
104 | 106 |
105 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; | 107 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; |
106 }; | 108 }; |
107 | 109 |
108 } // namespace WebKit | 110 } // namespace WebKit |
109 | 111 |
110 #endif | 112 #endif |
OLD | NEW |