| 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 28 matching lines...) Expand all Loading... |
| 39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 static IDBOpenDBRequest* Create(ScriptState*, | 42 static IDBOpenDBRequest* Create(ScriptState*, |
| 43 IDBDatabaseCallbacks*, | 43 IDBDatabaseCallbacks*, |
| 44 int64_t transaction_id, | 44 int64_t transaction_id, |
| 45 int64_t version); | 45 int64_t version); |
| 46 ~IDBOpenDBRequest() override; | 46 ~IDBOpenDBRequest() override; |
| 47 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
| 48 | 48 |
| 49 using IDBRequest::EnqueueResponse; | |
| 50 | |
| 51 void EnqueueBlocked(int64_t existing_version) override; | 49 void EnqueueBlocked(int64_t existing_version) override; |
| 52 void EnqueueUpgradeNeeded(int64_t old_version, | 50 void EnqueueUpgradeNeeded(int64_t old_version, |
| 53 std::unique_ptr<WebIDBDatabase>, | 51 std::unique_ptr<WebIDBDatabase>, |
| 54 const IDBDatabaseMetadata&, | 52 const IDBDatabaseMetadata&, |
| 55 WebIDBDataLoss, | 53 WebIDBDataLoss, |
| 56 String data_loss_message) override; | 54 String data_loss_message) override; |
| 57 void EnqueueResponse(std::unique_ptr<WebIDBDatabase>, | 55 void EnqueueResponse(std::unique_ptr<WebIDBDatabase>, |
| 58 const IDBDatabaseMetadata&) override; | 56 const IDBDatabaseMetadata&) override; |
| 59 void EnqueueResponse(int64_t old_version) override; | |
| 60 | 57 |
| 61 // SuspendableObject | 58 // SuspendableObject |
| 62 void ContextDestroyed(ExecutionContext*) final; | 59 void ContextDestroyed(ExecutionContext*) final; |
| 63 | 60 |
| 64 // EventTarget | 61 // EventTarget |
| 65 const AtomicString& InterfaceName() const override; | 62 const AtomicString& InterfaceName() const override; |
| 66 | 63 |
| 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); | 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked); |
| 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); | 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded); |
| 69 | 66 |
| 70 protected: | 67 protected: |
| 68 void EnqueueResponse(int64_t old_version) override; |
| 69 |
| 71 bool ShouldEnqueueEvent() const override; | 70 bool ShouldEnqueueEvent() const override; |
| 72 | 71 |
| 73 // EventTarget | 72 // EventTarget |
| 74 DispatchEventResult DispatchEventInternal(Event*) override; | 73 DispatchEventResult DispatchEventInternal(Event*) override; |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 IDBOpenDBRequest(ScriptState*, | 76 IDBOpenDBRequest(ScriptState*, |
| 78 IDBDatabaseCallbacks*, | 77 IDBDatabaseCallbacks*, |
| 79 int64_t transaction_id, | 78 int64_t transaction_id, |
| 80 int64_t version); | 79 int64_t version); |
| 81 | 80 |
| 82 Member<IDBDatabaseCallbacks> database_callbacks_; | 81 Member<IDBDatabaseCallbacks> database_callbacks_; |
| 83 const int64_t transaction_id_; | 82 const int64_t transaction_id_; |
| 84 int64_t version_; | 83 int64_t version_; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace blink | 86 } // namespace blink |
| 88 | 87 |
| 89 #endif // IDBOpenDBRequest_h | 88 #endif // IDBOpenDBRequest_h |
| OLD | NEW |