OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 "heap/Handle.h" | 29 #include "heap/Handle.h" |
30 | 30 |
31 #include "modules/indexeddb/IDBRequest.h" | 31 #include "modules/indexeddb/IDBRequest.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class IDBDatabaseCallbacksImpl; | 35 class IDBDatabaseCallbacksImpl; |
36 | 36 |
37 class IDBOpenDBRequest : public IDBRequest { | 37 class IDBOpenDBRequest : public IDBRequest { |
38 public: | 38 public: |
39 static PassRefPtr<IDBOpenDBRequest> create(ScriptExecutionContext*, PassRefP
tr<IDBDatabaseCallbacksImpl>, int64_t transactionId, int64_t version); | 39 static PassRefPtr<IDBOpenDBRequest> create(ScriptExecutionContext*, IDBDatab
aseCallbacksImpl*, int64_t transactionId, int64_t version); |
40 virtual ~IDBOpenDBRequest(); | 40 virtual ~IDBOpenDBRequest(); |
41 | 41 |
42 using IDBRequest::onSuccess; | 42 using IDBRequest::onSuccess; |
43 | 43 |
44 virtual void onBlocked(int64_t existingVersion) OVERRIDE; | 44 virtual void onBlocked(int64_t existingVersion) OVERRIDE; |
45 virtual void onUpgradeNeeded(int64_t oldVersion, PassRefPtr<IDBDatabaseBacke
ndInterface>, const IDBDatabaseMetadata&) OVERRIDE; | 45 virtual void onUpgradeNeeded(int64_t oldVersion, IDBDatabaseBackendInterface
*, const IDBDatabaseMetadata&) OVERRIDE; |
46 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat
abaseMetadata&) OVERRIDE; | 46 virtual void onSuccess(IDBDatabaseBackendInterface*, const IDBDatabaseMetada
ta&) OVERRIDE; |
47 | 47 |
48 // EventTarget | 48 // EventTarget |
49 virtual const AtomicString& interfaceName() const; | 49 virtual const AtomicString& interfaceName() const; |
50 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; | 50 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; |
51 | 51 |
52 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); | 52 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); |
53 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); | 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); |
54 | 54 |
55 protected: | 55 protected: |
56 virtual bool shouldEnqueueEvent() const OVERRIDE; | 56 virtual bool shouldEnqueueEvent() const OVERRIDE; |
57 | 57 |
58 private: | 58 private: |
59 IDBOpenDBRequest(ScriptExecutionContext*, PassRefPtr<IDBDatabaseCallbacksImp
l>, int64_t transactionId, int64_t version); | 59 IDBOpenDBRequest(ScriptExecutionContext*, IDBDatabaseCallbacksImpl*, int64_t
transactionId, int64_t version); |
60 | 60 |
61 RefPtr<IDBDatabaseCallbacksImpl> m_databaseCallbacks; | 61 Persistent<IDBDatabaseCallbacksImpl> m_databaseCallbacks; |
62 const int64_t m_transactionId; | 62 const int64_t m_transactionId; |
63 int64_t m_version; | 63 int64_t m_version; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace WebCore | 66 } // namespace WebCore |
67 | 67 |
68 #endif // IDBOpenDBRequest_h | 68 #endif // IDBOpenDBRequest_h |
OLD | NEW |