| 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 | 49 |
| 50 class DOMError; | 50 class DOMError; |
| 51 class ExceptionState; | 51 class ExceptionState; |
| 52 class ExecutionContext; | 52 class ExecutionContext; |
| 53 | 53 |
| 54 class IDBDatabase FINAL | 54 class IDBDatabase FINAL |
| 55 : public RefCountedWillBeRefCountedGarbageCollected<IDBDatabase> | 55 : public RefCountedWillBeRefCountedGarbageCollected<IDBDatabase> |
| 56 , public ScriptWrappable | 56 , public ScriptWrappable |
| 57 , public EventTargetWithInlineData | 57 , public EventTargetWithInlineData |
| 58 , public ActiveDOMObject { | 58 , public ActiveDOMObject { |
| 59 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<I
DBDatabase>); | 59 REFCOUNTED_EVENT_TARGET(IDBDatabase); |
| 60 | 60 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase); |
| 61 public: | 61 public: |
| 62 static PassRefPtrWillBeRawPtr<IDBDatabase> create(ExecutionContext*, PassOwn
Ptr<blink::WebIDBDatabase>, PassRefPtrWillBeRawPtr<IDBDatabaseCallbacks>); | 62 static PassRefPtrWillBeRawPtr<IDBDatabase> create(ExecutionContext*, PassOwn
Ptr<blink::WebIDBDatabase>, PassRefPtrWillBeRawPtr<IDBDatabaseCallbacks>); |
| 63 virtual ~IDBDatabase(); | 63 virtual ~IDBDatabase(); |
| 64 void trace(Visitor*); | 64 virtual void trace(Visitor*) OVERRIDE; |
| 65 | 65 |
| 66 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } | 66 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat
a; } |
| 67 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); | 67 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); |
| 68 void indexDeleted(int64_t objectStoreId, int64_t indexId); | 68 void indexDeleted(int64_t objectStoreId, int64_t indexId); |
| 69 void transactionCreated(IDBTransaction*); | 69 void transactionCreated(IDBTransaction*); |
| 70 void transactionFinished(const IDBTransaction*); | 70 void transactionFinished(const IDBTransaction*); |
| 71 | 71 |
| 72 // Implement the IDL | 72 // Implement the IDL |
| 73 const String& name() const { return m_metadata.name; } | 73 const String& name() const { return m_metadata.name; } |
| 74 ScriptValue version(ScriptState*) const; | 74 ScriptValue version(ScriptState*) const; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // Keep track of the versionchange events waiting to be fired on this | 154 // Keep track of the versionchange events waiting to be fired on this |
| 155 // database so that we can cancel them if the database closes. | 155 // database so that we can cancel them if the database closes. |
| 156 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; | 156 WillBeHeapVector<RefPtrWillBeMember<Event> > m_enqueuedEvents; |
| 157 | 157 |
| 158 RefPtrWillBeMember<IDBDatabaseCallbacks> m_databaseCallbacks; | 158 RefPtrWillBeMember<IDBDatabaseCallbacks> m_databaseCallbacks; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } // namespace WebCore | 161 } // namespace WebCore |
| 162 | 162 |
| 163 #endif // IDBDatabase_h | 163 #endif // IDBDatabase_h |
| OLD | NEW |