Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: content/browser/indexed_db/indexed_db_observation.h

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: IDBDatabase weakptr introduced on IDBObserver Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698