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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 RefCountedGarbageCollected<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>); | 58 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<IDBDatabase>); |
59 | 59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase); |
60 public: | 60 public: |
61 static IDBDatabase* create(ExecutionContext*, PassOwnPtr<blink::WebIDBDataba
se>, IDBDatabaseCallbacks*); | 61 static IDBDatabase* create(ExecutionContext*, PassOwnPtr<blink::WebIDBDataba
se>, IDBDatabaseCallbacks*); |
62 virtual ~IDBDatabase(); | 62 virtual ~IDBDatabase(); |
63 void trace(Visitor*); | 63 virtual void trace(Visitor*) OVERRIDE; |
64 | 64 |
65 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } | 65 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } |
66 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); | 66 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); |
67 void indexDeleted(int64_t objectStoreId, int64_t indexId); | 67 void indexDeleted(int64_t objectStoreId, int64_t indexId); |
68 void transactionCreated(IDBTransaction*); | 68 void transactionCreated(IDBTransaction*); |
69 void transactionFinished(const IDBTransaction*); | 69 void transactionFinished(const IDBTransaction*); |
70 | 70 |
71 // Implement the IDL | 71 // Implement the IDL |
72 const String& name() const { return m_metadata.name; } | 72 const String& name() const { return m_metadata.name; } |
73 ScriptValue version(ScriptState*) const; | 73 ScriptValue version(ScriptState*) const; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // Keep track of the versionchange events waiting to be fired on this | 153 // Keep track of the versionchange events waiting to be fired on this |
154 // database so that we can cancel them if the database closes. | 154 // database so that we can cancel them if the database closes. |
155 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; | 155 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; |
156 | 156 |
157 Member<IDBDatabaseCallbacks> m_databaseCallbacks; | 157 Member<IDBDatabaseCallbacks> m_databaseCallbacks; |
158 }; | 158 }; |
159 | 159 |
160 } // namespace WebCore | 160 } // namespace WebCore |
161 | 161 |
162 #endif // IDBDatabase_h | 162 #endif // IDBDatabase_h |
OLD | NEW |