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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "core/dom/ExecutionContext.h" | 34 #include "core/dom/ExecutionContext.h" |
35 #include "modules/crypto/WorkerCrypto.h" | 35 #include "modules/crypto/WorkerCrypto.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 WorkerGlobalScopeCrypto::WorkerGlobalScopeCrypto() | 39 WorkerGlobalScopeCrypto::WorkerGlobalScopeCrypto() |
40 { | 40 { |
41 } | 41 } |
42 | 42 |
43 WorkerGlobalScopeCrypto::~WorkerGlobalScopeCrypto() | |
44 { | |
45 } | |
46 | |
47 const char* WorkerGlobalScopeCrypto::supplementName() | 43 const char* WorkerGlobalScopeCrypto::supplementName() |
48 { | 44 { |
49 return "WorkerGlobalScopeCrypto"; | 45 return "WorkerGlobalScopeCrypto"; |
50 } | 46 } |
51 | 47 |
52 WorkerGlobalScopeCrypto& WorkerGlobalScopeCrypto::from(WillBeHeapSupplementable<
WorkerGlobalScope>& context) | 48 WorkerGlobalScopeCrypto& WorkerGlobalScopeCrypto::from(WillBeHeapSupplementable<
WorkerGlobalScope>& context) |
53 { | 49 { |
54 WorkerGlobalScopeCrypto* supplement = static_cast<WorkerGlobalScopeCrypto*>(
WillBeHeapSupplement<WorkerGlobalScope>::from(context, supplementName())); | 50 WorkerGlobalScopeCrypto* supplement = static_cast<WorkerGlobalScopeCrypto*>(
WillBeHeapSupplement<WorkerGlobalScope>::from(context, supplementName())); |
55 if (!supplement) { | 51 if (!supplement) { |
56 supplement = new WorkerGlobalScopeCrypto(); | 52 supplement = new WorkerGlobalScopeCrypto(); |
(...skipping 13 matching lines...) Expand all Loading... |
70 m_crypto = WorkerCrypto::create(); | 66 m_crypto = WorkerCrypto::create(); |
71 return m_crypto.get(); | 67 return m_crypto.get(); |
72 } | 68 } |
73 | 69 |
74 void WorkerGlobalScopeCrypto::trace(Visitor* visitor) | 70 void WorkerGlobalScopeCrypto::trace(Visitor* visitor) |
75 { | 71 { |
76 visitor->trace(m_crypto); | 72 visitor->trace(m_crypto); |
77 } | 73 } |
78 | 74 |
79 } // namespace WebCore | 75 } // namespace WebCore |
OLD | NEW |