Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1464)

Unified Diff: Source/modules/crypto/WorkerContextCrypto.h

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/crypto/WorkerContextCrypto.h
diff --git a/Source/modules/crypto/DOMWindowCrypto.h b/Source/modules/crypto/WorkerContextCrypto.h
similarity index 78%
copy from Source/modules/crypto/DOMWindowCrypto.h
copy to Source/modules/crypto/WorkerContextCrypto.h
index 2d87e7a0770a22ae2d22fe475194f90cce958b0d..7f0504a7ede801611b2554137052e97a38ed1865 100644
--- a/Source/modules/crypto/DOMWindowCrypto.h
+++ b/Source/modules/crypto/WorkerContextCrypto.h
@@ -28,31 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DOMWindowCrypto_h
-#define DOMWindowCrypto_h
+#ifndef WorkerContextCrypto_h
+#define WorkerContextCrypto_h
-#include "core/page/DOMWindowProperty.h"
#include "core/platform/Supplementable.h"
namespace WebCore {
-class Crypto;
-class DOMWindow;
+class WorkerCrypto;
+class ScriptExecutionContext;
-class DOMWindowCrypto : public Supplement<DOMWindow>, public DOMWindowProperty {
+class WorkerContextCrypto : public Supplement<ScriptExecutionContext> {
public:
- virtual ~DOMWindowCrypto();
- static DOMWindowCrypto* from(DOMWindow*);
- static Crypto* crypto(DOMWindow*);
- Crypto* crypto() const;
+ virtual ~WorkerContextCrypto();
+ static WorkerContextCrypto* from(ScriptExecutionContext*);
+ static WorkerCrypto* crypto(ScriptExecutionContext*);
+ WorkerCrypto* crypto() const;
private:
- explicit DOMWindowCrypto(DOMWindow*);
+ WorkerContextCrypto();
static const char* supplementName();
- mutable RefPtr<Crypto> m_crypto;
+ mutable RefPtr<WorkerCrypto> m_crypto;
};
} // namespace WebCore
-#endif // DOMWindowCrypto_h
+#endif // WorkerContextCrypto_h

Powered by Google App Engine
This is Rietveld 408576698