OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "wtf/PassRefPtr.h" | 44 #include "wtf/PassRefPtr.h" |
45 #include "wtf/RefPtr.h" | 45 #include "wtf/RefPtr.h" |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
49 class DOMError; | 49 class DOMError; |
50 class ExceptionState; | 50 class ExceptionState; |
51 class ExecutionContext; | 51 class ExecutionContext; |
52 | 52 |
53 class IDBDatabase FINAL | 53 class IDBDatabase FINAL |
54 : public RefCountedGarbageCollected<IDBDatabase> | 54 : public GarbageCollectedFinalized<IDBDatabase> |
55 , public ScriptWrappable | 55 , public ScriptWrappable |
56 , public EventTargetWithInlineData | 56 , public EventTargetWithInlineData |
57 , public ActiveDOMObject { | 57 , public ActiveDOMObject { |
58 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<IDBDatabase>); | |
59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase); | 58 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase); |
60 public: | 59 public: |
61 static IDBDatabase* create(ExecutionContext*, PassOwnPtr<blink::WebIDBDataba
se>, IDBDatabaseCallbacks*); | 60 static IDBDatabase* create(ExecutionContext*, PassOwnPtr<blink::WebIDBDataba
se>, IDBDatabaseCallbacks*); |
62 virtual ~IDBDatabase(); | 61 virtual ~IDBDatabase(); |
63 virtual void trace(Visitor*) OVERRIDE; | 62 virtual void trace(Visitor*) OVERRIDE; |
64 | 63 |
65 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } | 64 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } |
66 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); | 65 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); |
67 void indexDeleted(int64_t objectStoreId, int64_t indexId); | 66 void indexDeleted(int64_t objectStoreId, int64_t indexId); |
68 void transactionCreated(IDBTransaction*); | 67 void transactionCreated(IDBTransaction*); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // Keep track of the versionchange events waiting to be fired on this | 152 // Keep track of the versionchange events waiting to be fired on this |
154 // database so that we can cancel them if the database closes. | 153 // database so that we can cancel them if the database closes. |
155 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; | 154 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; |
156 | 155 |
157 Member<IDBDatabaseCallbacks> m_databaseCallbacks; | 156 Member<IDBDatabaseCallbacks> m_databaseCallbacks; |
158 }; | 157 }; |
159 | 158 |
160 } // namespace WebCore | 159 } // namespace WebCore |
161 | 160 |
162 #endif // IDBDatabase_h | 161 #endif // IDBDatabase_h |
OLD | NEW |