| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/frame/LocalDOMWindow.h" | 34 #include "core/frame/LocalDOMWindow.h" |
| 35 #include "modules/crypto/Crypto.h" | 35 #include "modules/crypto/Crypto.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 DOMWindowCrypto::DOMWindowCrypto(LocalDOMWindow& window) | 39 DOMWindowCrypto::DOMWindowCrypto(LocalDOMWindow& window) |
| 40 : DOMWindowProperty(window.frame()) | 40 : DOMWindowProperty(window.frame()) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 DOMWindowCrypto::~DOMWindowCrypto() | 44 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowCrypto); |
| 45 { | |
| 46 } | |
| 47 | 45 |
| 48 const char* DOMWindowCrypto::supplementName() | 46 const char* DOMWindowCrypto::supplementName() |
| 49 { | 47 { |
| 50 return "DOMWindowCrypto"; | 48 return "DOMWindowCrypto"; |
| 51 } | 49 } |
| 52 | 50 |
| 53 DOMWindowCrypto& DOMWindowCrypto::from(LocalDOMWindow& window) | 51 DOMWindowCrypto& DOMWindowCrypto::from(LocalDOMWindow& window) |
| 54 { | 52 { |
| 55 DOMWindowCrypto* supplement = static_cast<DOMWindowCrypto*>(WillBeHeapSupple
ment<LocalDOMWindow>::from(window, supplementName())); | 53 DOMWindowCrypto* supplement = static_cast<DOMWindowCrypto*>(WillBeHeapSupple
ment<LocalDOMWindow>::from(window, supplementName())); |
| 56 if (!supplement) { | 54 if (!supplement) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 { | 67 { |
| 70 if (!m_crypto && frame()) | 68 if (!m_crypto && frame()) |
| 71 m_crypto = Crypto::create(); | 69 m_crypto = Crypto::create(); |
| 72 return m_crypto.get(); | 70 return m_crypto.get(); |
| 73 } | 71 } |
| 74 | 72 |
| 75 void DOMWindowCrypto::trace(Visitor* visitor) | 73 void DOMWindowCrypto::trace(Visitor* visitor) |
| 76 { | 74 { |
| 77 visitor->trace(m_crypto); | 75 visitor->trace(m_crypto); |
| 78 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); | 76 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); |
| 77 DOMWindowProperty::trace(visitor); |
| 79 } | 78 } |
| 80 | 79 |
| 81 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |