Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 #include <wtf/PassRefPtr.h> | 34 #include <wtf/PassRefPtr.h> |
| 35 #include <wtf/RefPtr.h> | 35 #include <wtf/RefPtr.h> |
| 36 | 36 |
| 37 namespace WebKit { | 37 namespace WebKit { |
| 38 | 38 |
| 39 class WebIDBCallbacks; | 39 class WebIDBCallbacks; |
| 40 class IDBDatabaseCallbacksProxy; | 40 class IDBDatabaseCallbacksProxy; |
| 41 | 41 |
| 42 class IDBCallbacksProxy : public WebCore::IDBCallbacks { | 42 class IDBCallbacksProxy : public WebCore::IDBCallbacks { |
| 43 public: | 43 public: |
| 44 static PassRefPtr<IDBCallbacksProxy> create(PassOwnPtr<WebIDBCallbacks>); | 44 static IDBCallbacksProxy* create(PassOwnPtr<WebIDBCallbacks>); |
| 45 virtual ~IDBCallbacksProxy(); | 45 virtual ~IDBCallbacksProxy(); |
| 46 | 46 |
| 47 virtual void onError(PassRefPtr<WebCore::IDBDatabaseError>); | 47 virtual void onError(PassRefPtr<WebCore::IDBDatabaseError>); |
| 48 virtual void onSuccess(const Vector<String>&); | 48 virtual void onSuccess(const Vector<String>&); |
| 49 virtual void onSuccess(PassRefPtr<WebCore::IDBCursorBackendInterface>, PassR efPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCo re::SharedBuffer>); | 49 virtual void onSuccess(PassRefPtr<WebCore::IDBCursorBackendInterface>, PassR efPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBKey> primaryKey, PassRefPtr<WebCo re::SharedBuffer>); |
| 50 virtual void onSuccess(PassRefPtr<WebCore::IDBDatabaseBackendInterface>, con st WebCore::IDBDatabaseMetadata&); | 50 virtual void onSuccess(WebCore::IDBDatabaseBackendInterface*, const WebCore: :IDBDatabaseMetadata&); |
| 51 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>); | 51 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>); |
| 52 virtual void onSuccess(PassRefPtr<WebCore::SharedBuffer>); | 52 virtual void onSuccess(PassRefPtr<WebCore::SharedBuffer>); |
| 53 virtual void onSuccess(PassRefPtr<WebCore::SharedBuffer>, PassRefPtr<WebCore ::IDBKey>, const WebCore::IDBKeyPath&); | 53 virtual void onSuccess(PassRefPtr<WebCore::SharedBuffer>, PassRefPtr<WebCore ::IDBKey>, const WebCore::IDBKeyPath&); |
| 54 virtual void onSuccess(int64_t); | 54 virtual void onSuccess(int64_t); |
| 55 virtual void onSuccess(); | 55 virtual void onSuccess(); |
| 56 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBK ey> primaryKey, PassRefPtr<WebCore::SharedBuffer>); | 56 virtual void onSuccess(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBK ey> primaryKey, PassRefPtr<WebCore::SharedBuffer>); |
| 57 virtual void onSuccessWithPrefetch(const Vector<RefPtr<WebCore::IDBKey> >& k eys, const Vector<RefPtr<WebCore::IDBKey> >& primaryKeys, const Vector<RefPtr<We bCore::SharedBuffer> >& values); | 57 virtual void onSuccessWithPrefetch(const Vector<RefPtr<WebCore::IDBKey> >& k eys, const Vector<RefPtr<WebCore::IDBKey> >& primaryKeys, const Vector<RefPtr<We bCore::SharedBuffer> >& values); |
| 58 virtual void onBlocked(int64_t existingVersion); | 58 virtual void onBlocked(int64_t existingVersion); |
| 59 virtual void onUpgradeNeeded(int64_t oldVersion, PassRefPtr<WebCore::IDBData baseBackendInterface>, const WebCore::IDBDatabaseMetadata&); | 59 virtual void onUpgradeNeeded(int64_t oldVersion, WebCore::IDBDatabaseBackend Interface*, const WebCore::IDBDatabaseMetadata&); |
| 60 | 60 |
| 61 void setDatabaseCallbacks(PassRefPtr<IDBDatabaseCallbacksProxy>); | 61 void setDatabaseCallbacks(IDBDatabaseCallbacksProxy*); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 IDBCallbacksProxy(PassOwnPtr<WebIDBCallbacks>); | 64 IDBCallbacksProxy(PassOwnPtr<WebIDBCallbacks>); |
| 65 | 65 |
| 66 OwnPtr<WebIDBCallbacks> m_callbacks; | 66 OwnPtr<WebIDBCallbacks> m_callbacks; |
| 67 RefPtr<IDBDatabaseCallbacksProxy> m_databaseCallbacks; | 67 WebCore::Persistent<IDBDatabaseCallbacksProxy> m_databaseCallbacks; |
|
haraken
2013/11/26 07:26:02
Help me debug when you have time.
I'm hitting the
| |
| 68 bool m_didComplete; | 68 bool m_didComplete; |
| 69 bool m_didCreateProxy; | 69 bool m_didCreateProxy; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace WebKit | 72 } // namespace WebKit |
| 73 | 73 |
| 74 #endif // IDBCallbacksProxy_h | 74 #endif // IDBCallbacksProxy_h |
| OLD | NEW |