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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: Replying to comments, disallowed observing from versionchange txn Created 3 years, 11 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // IDBDatabaseCallbacks 50 // IDBDatabaseCallbacks
51 virtual void onForcedClose(); 51 virtual void onForcedClose();
52 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion); 52 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion);
53 53
54 virtual void onAbort(int64_t transactionId, DOMException*); 54 virtual void onAbort(int64_t transactionId, DOMException*);
55 virtual void onComplete(int64_t transactionId); 55 virtual void onComplete(int64_t transactionId);
56 virtual void onChanges( 56 virtual void onChanges(
57 const std::unordered_map<int32_t, std::vector<int32_t>>& 57 const std::unordered_map<int32_t, std::vector<int32_t>>&
58 observation_index_map, 58 observation_index_map,
59 const WebVector<WebIDBObservation>& observations); 59 const WebVector<WebIDBObservation>& observations,
60 const std::unordered_map<int32_t,
pwnall 2017/01/10 01:41:11 Can you alias this type to a meaningful name?
dmurph 2017/01/10 20:40:08 Done.
61 std::pair<int64_t, std::vector<int64_t>>>&
62 transactions);
60 63
61 void connect(IDBDatabase*); 64 void connect(IDBDatabase*);
62 65
63 // Returns a new WebIDBDatabaseCallbacks for this object. Must only be 66 // Returns a new WebIDBDatabaseCallbacks for this object. Must only be
64 // called once. 67 // called once.
65 std::unique_ptr<WebIDBDatabaseCallbacks> createWebCallbacks(); 68 std::unique_ptr<WebIDBDatabaseCallbacks> createWebCallbacks();
66 void detachWebCallbacks(); 69 void detachWebCallbacks();
67 void webCallbacksDestroyed(); 70 void webCallbacksDestroyed();
68 71
69 protected: 72 protected:
(...skipping 11 matching lines...) Expand all
81 WeakMember<IDBDatabase> m_database; 84 WeakMember<IDBDatabase> m_database;
82 85
83 // Pointer back to the WebIDBDatabaseCallbacks that holds a persistent 86 // Pointer back to the WebIDBDatabaseCallbacks that holds a persistent
84 // reference to this object. 87 // reference to this object.
85 WebIDBDatabaseCallbacks* m_webCallbacks = nullptr; 88 WebIDBDatabaseCallbacks* m_webCallbacks = nullptr;
86 }; 89 };
87 90
88 } // namespace blink 91 } // namespace blink
89 92
90 #endif // IDBDatabaseCallbacks_h 93 #endif // IDBDatabaseCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698