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(OperationType); |
| 21 IndexedDBObservation(OperationType, IndexedDBKeyRange); |
| 22 IndexedDBObservation(OperationType, IndexedDBKeyRange, IndexedDBValue); |
| 23 |
| 24 ~IndexedDBObservation(); |
| 25 |
| 26 OperationType type() const { return type_; } |
| 27 IndexedDBKeyRange key_range() const { return key_range_; } |
| 28 IndexedDBValue value() const { return value_; } |
| 29 |
| 30 private: |
| 31 // Required. |
| 32 OperationType type_; |
| 33 // Populated for ADD, PUT, and DELETE operations. |
| 34 IndexedDBKeyRange key_range_; |
| 35 // Populated for ADD and PUT operations if values are requested. |
| 36 IndexedDBValue value_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(IndexedDBObservation); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
OLD | NEW |