OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "content/browser/indexed_db/indexed_db_value.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/common/indexed_db/indexed_db_key_range.h" |
| 12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class CONTENT_EXPORT IndexedDBObservation { |
| 17 public: |
| 18 using OperationType = blink::WebIDBOperationType; |
| 19 |
| 20 IndexedDBObservation(int32_t object_store_id, OperationType); |
| 21 IndexedDBObservation(int32_t object_store_id, |
| 22 OperationType, |
| 23 IndexedDBKeyRange); |
| 24 IndexedDBObservation(int32_t object_store_id, |
| 25 OperationType, |
| 26 IndexedDBKeyRange, |
| 27 IndexedDBValue); |
| 28 |
| 29 ~IndexedDBObservation(); |
| 30 |
| 31 int32_t object_store_id() const { return object_store_id_; } |
| 32 OperationType type() const { return type_; } |
| 33 IndexedDBKeyRange key_range() const { return key_range_; } |
| 34 IndexedDBValue value() const { return value_; } |
| 35 |
| 36 private: |
| 37 int32_t object_store_id_; |
| 38 OperationType type_; |
| 39 // Populated for ADD, PUT, and DELETE operations. |
| 40 IndexedDBKeyRange key_range_; |
| 41 // Populated for ADD and PUT operations if values are requested. |
| 42 IndexedDBValue value_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(IndexedDBObservation); |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
OLD | NEW |