| 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 18 matching lines...) Expand all  Loading... | 
| 29 #include "modules/indexeddb/IDBDatabaseCallbacks.h" | 29 #include "modules/indexeddb/IDBDatabaseCallbacks.h" | 
| 30 #include "wtf/RefCounted.h" | 30 #include "wtf/RefCounted.h" | 
| 31 #include "wtf/text/WTFString.h" | 31 #include "wtf/text/WTFString.h" | 
| 32 | 32 | 
| 33 namespace WebCore { | 33 namespace WebCore { | 
| 34 | 34 | 
| 35 class IDBDatabase; | 35 class IDBDatabase; | 
| 36 | 36 | 
| 37 class IDBDatabaseCallbacksImpl : public IDBDatabaseCallbacks { | 37 class IDBDatabaseCallbacksImpl : public IDBDatabaseCallbacks { | 
| 38 public: | 38 public: | 
| 39     static PassRefPtr<IDBDatabaseCallbacksImpl> create(); | 39     static IDBDatabaseCallbacksImpl* create(); | 
| 40     virtual ~IDBDatabaseCallbacksImpl(); | 40     virtual ~IDBDatabaseCallbacksImpl(); | 
| 41 | 41 | 
| 42     // IDBDatabaseCallbacks | 42     // IDBDatabaseCallbacks | 
| 43     virtual void onForcedClose(); | 43     virtual void onForcedClose(); | 
| 44     virtual void onVersionChange(int64_t oldVersion, int64_t newVersion); | 44     virtual void onVersionChange(int64_t oldVersion, int64_t newVersion); | 
| 45 | 45 | 
| 46     virtual void onAbort(int64_t transactionId, PassRefPtr<IDBDatabaseError>); | 46     virtual void onAbort(int64_t transactionId, PassRefPtr<IDBDatabaseError>); | 
| 47     virtual void onComplete(int64_t transactionId); | 47     virtual void onComplete(int64_t transactionId); | 
| 48 | 48 | 
| 49     void connect(IDBDatabase*); | 49     void connect(IDBDatabase*); | 
| 50 | 50 | 
|  | 51     virtual void trace(Visitor*); | 
|  | 52 | 
| 51 private: | 53 private: | 
| 52     IDBDatabaseCallbacksImpl(); | 54     IDBDatabaseCallbacksImpl(); | 
| 53 | 55 | 
| 54     // The initial IDBOpenDBRequest or final IDBDatabase maintains a RefPtr to t
    his | 56     // The initial IDBOpenDBRequest or final IDBDatabase maintains a RefPtr to t
    his. | 
|  | 57     // FIXME(oilpan): We should make this a Member once we move the entire Index
    edDB hierarchy to the heap. | 
|  | 58     // We cannot make it a Member at this point since changing a raw pointer to 
    a Member can create a cycle. | 
| 55     IDBDatabase* m_database; | 59     IDBDatabase* m_database; | 
| 56 }; | 60 }; | 
| 57 | 61 | 
| 58 } // namespace WebCore | 62 } // namespace WebCore | 
| 59 | 63 | 
| 60 #endif // IDBDatabaseCallbacksImpl_h | 64 #endif // IDBDatabaseCallbacksImpl_h | 
| OLD | NEW | 
|---|