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 20 matching lines...) Expand all Loading... |
31 #include "public/platform/modules/indexeddb/WebIDBDatabase.h" | 31 #include "public/platform/modules/indexeddb/WebIDBDatabase.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class IDBDatabaseCallbacks; | 35 class IDBDatabaseCallbacks; |
36 | 36 |
37 class MODULES_EXPORT IDBOpenDBRequest final : public IDBRequest { | 37 class MODULES_EXPORT IDBOpenDBRequest final : public IDBRequest { |
38 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
39 public: | 39 public: |
40 static IDBOpenDBRequest* create(ScriptState*, IDBDatabaseCallbacks*, int64_t
transactionId, int64_t version); | 40 static IDBOpenDBRequest* create(ScriptState*, IDBDatabaseCallbacks*, int64_t
transactionId, int64_t version); |
41 virtual ~IDBOpenDBRequest(); | 41 ~IDBOpenDBRequest() override; |
42 DECLARE_VIRTUAL_TRACE(); | 42 DECLARE_VIRTUAL_TRACE(); |
43 | 43 |
44 using IDBRequest::onSuccess; | 44 using IDBRequest::onSuccess; |
45 | 45 |
46 virtual void onBlocked(int64_t existingVersion) override; | 46 void onBlocked(int64_t existingVersion) override; |
47 virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>,
const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) override; | 47 void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>, const I
DBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) override; |
48 virtual void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata
&) override; | 48 void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&) overr
ide; |
49 virtual void onSuccess(int64_t oldVersion) override; | 49 void onSuccess(int64_t oldVersion) override; |
50 | 50 |
51 // EventTarget | 51 // EventTarget |
52 virtual const AtomicString& interfaceName() const override; | 52 const AtomicString& interfaceName() const override; |
53 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; | 53 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; |
54 | 54 |
55 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); |
56 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); | 56 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); |
57 | 57 |
58 protected: | 58 protected: |
59 virtual bool shouldEnqueueEvent() const override; | 59 bool shouldEnqueueEvent() const override; |
60 | 60 |
61 private: | 61 private: |
62 IDBOpenDBRequest(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId,
int64_t version); | 62 IDBOpenDBRequest(ScriptState*, IDBDatabaseCallbacks*, int64_t transactionId,
int64_t version); |
63 | 63 |
64 Member<IDBDatabaseCallbacks> m_databaseCallbacks; | 64 Member<IDBDatabaseCallbacks> m_databaseCallbacks; |
65 const int64_t m_transactionId; | 65 const int64_t m_transactionId; |
66 int64_t m_version; | 66 int64_t m_version; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace blink | 69 } // namespace blink |
70 | 70 |
71 #endif // IDBOpenDBRequest_h | 71 #endif // IDBOpenDBRequest_h |
OLD | NEW |