| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 met: | 5 * modification, are permitted provided that the following conditions are met: |
| 6 * | 6 * |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "modules/indexeddb/IDBFactory.h" | 32 #include "modules/indexeddb/IDBFactory.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(LocalDOMWindow& window) | 36 DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(LocalDOMWindow& window) |
| 37 : DOMWindowProperty(window.frame()) | 37 : DOMWindowProperty(window.frame()) |
| 38 , m_window(window) | 38 , m_window(window) |
| 39 { | 39 { |
| 40 } | 40 } |
| 41 | 41 |
| 42 DOMWindowIndexedDatabase::~DOMWindowIndexedDatabase() | 42 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowIndexedDatabase); |
| 43 { | |
| 44 } | |
| 45 | 43 |
| 46 void DOMWindowIndexedDatabase::trace(Visitor* visitor) | 44 void DOMWindowIndexedDatabase::trace(Visitor* visitor) |
| 47 { | 45 { |
| 48 visitor->trace(m_idbFactory); | 46 visitor->trace(m_idbFactory); |
| 49 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); | 47 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); |
| 48 DOMWindowProperty::trace(visitor); |
| 50 } | 49 } |
| 51 | 50 |
| 52 const char* DOMWindowIndexedDatabase::supplementName() | 51 const char* DOMWindowIndexedDatabase::supplementName() |
| 53 { | 52 { |
| 54 return "DOMWindowIndexedDatabase"; | 53 return "DOMWindowIndexedDatabase"; |
| 55 } | 54 } |
| 56 | 55 |
| 57 DOMWindowIndexedDatabase& DOMWindowIndexedDatabase::from(LocalDOMWindow& window) | 56 DOMWindowIndexedDatabase& DOMWindowIndexedDatabase::from(LocalDOMWindow& window) |
| 58 { | 57 { |
| 59 DOMWindowIndexedDatabase* supplement = static_cast<DOMWindowIndexedDatabase*
>(WillBeHeapSupplement<LocalDOMWindow>::from(window, supplementName())); | 58 DOMWindowIndexedDatabase* supplement = static_cast<DOMWindowIndexedDatabase*
>(WillBeHeapSupplement<LocalDOMWindow>::from(window, supplementName())); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 92 |
| 94 if (!m_window.isCurrentlyDisplayedInFrame()) | 93 if (!m_window.isCurrentlyDisplayedInFrame()) |
| 95 return 0; | 94 return 0; |
| 96 | 95 |
| 97 if (!m_idbFactory) | 96 if (!m_idbFactory) |
| 98 m_idbFactory = IDBFactory::create(IndexedDBClient::create()); | 97 m_idbFactory = IDBFactory::create(IndexedDBClient::create()); |
| 99 return m_idbFactory.get(); | 98 return m_idbFactory.get(); |
| 100 } | 99 } |
| 101 | 100 |
| 102 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |