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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef IDBDatabaseCallbacks_h | 26 #ifndef IDBDatabaseCallbacks_h |
27 #define IDBDatabaseCallbacks_h | 27 #define IDBDatabaseCallbacks_h |
28 | 28 |
29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
30 #include "wtf/PassRefPtr.h" | 30 #include "wtf/PassRefPtr.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace blink { |
33 | 33 |
34 class DOMError; | 34 class DOMError; |
35 class IDBDatabase; | 35 class IDBDatabase; |
36 | 36 |
37 class IDBDatabaseCallbacks : public GarbageCollectedFinalized<IDBDatabaseCallbac
ks> { | 37 class IDBDatabaseCallbacks : public GarbageCollectedFinalized<IDBDatabaseCallbac
ks> { |
38 public: | 38 public: |
39 static IDBDatabaseCallbacks* create(); | 39 static IDBDatabaseCallbacks* create(); |
40 virtual ~IDBDatabaseCallbacks(); | 40 virtual ~IDBDatabaseCallbacks(); |
41 void trace(Visitor*); | 41 void trace(Visitor*); |
42 | 42 |
(...skipping 14 matching lines...) Expand all Loading... |
57 // The initial IDBOpenDBRequest, final IDBDatabase, and/or | 57 // The initial IDBOpenDBRequest, final IDBDatabase, and/or |
58 // WebIDBDatabaseCallbacks have strong references to an IDBDatabaseCallbacks | 58 // WebIDBDatabaseCallbacks have strong references to an IDBDatabaseCallbacks |
59 // object. | 59 // object. |
60 // Oilpan: We'd like to delete an IDBDatabase object by a | 60 // Oilpan: We'd like to delete an IDBDatabase object by a |
61 // GC. WebIDBDatabaseCallbacks can survive the GC, and IDBDatabaseCallbacks | 61 // GC. WebIDBDatabaseCallbacks can survive the GC, and IDBDatabaseCallbacks |
62 // can survive too. m_database should be a weak reference to avoid that an | 62 // can survive too. m_database should be a weak reference to avoid that an |
63 // IDBDatabase survives the GC with the IDBDatabaseCallbacks. | 63 // IDBDatabase survives the GC with the IDBDatabaseCallbacks. |
64 WeakMember<IDBDatabase> m_database; | 64 WeakMember<IDBDatabase> m_database; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace WebCore | 67 } // namespace blink |
68 | 68 |
69 #endif // IDBDatabaseCallbacks_h | 69 #endif // IDBDatabaseCallbacks_h |
OLD | NEW |