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

Side by Side Diff: content/common/indexed_db/indexed_db_messages.h

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Remove unnecessary forward declaration. Created 4 years 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Message definition file, included multiple times, hence no include guard. 5 // Message definition file, included multiple times, hence no include guard.
6 6
7 #include <stdint.h> 7 #include "ipc/ipc_message_macros.h"
8 8
9 #include <map>
10 #include <string>
11 #include <utility>
12 #include <vector>
13
14 #include "content/common/indexed_db/indexed_db_key.h"
15 #include "content/common/indexed_db/indexed_db_key_path.h"
16 #include "content/common/indexed_db/indexed_db_key_range.h"
17 #include "content/common/indexed_db/indexed_db_param_traits.h"
18 #include "content/public/common/common_param_traits.h"
19 #include "content/public/common/common_param_traits_macros.h"
20 #include "ipc/ipc_message_macros.h"
21 #include "ipc/ipc_message_utils.h"
22 #include "ipc/ipc_param_traits.h"
23 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
24
25 // Singly-included section for typedefs in multiply-included file.
26 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
27 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
28
29 // IPC_MESSAGE macros fail on the std::map, when expanding. We need to define
30 // a type to avoid that.
31 // Map observer_id to corresponding set of indices in observations.
32 typedef std::map<int32_t, std::vector<int32_t>> ObservationIndex;
33
34 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
35
36 #undef IPC_MESSAGE_EXPORT
37 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
38 #define IPC_MESSAGE_START IndexedDBMsgStart 9 #define IPC_MESSAGE_START IndexedDBMsgStart
39
40 // Argument structures used in messages
41
42 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBOperationType,
43 blink::WebIDBOperationTypeLast)
44
45 IPC_STRUCT_BEGIN(IndexedDBMsg_Observation)
46 IPC_STRUCT_MEMBER(int64_t, object_store_id)
47 IPC_STRUCT_MEMBER(blink::WebIDBOperationType, type)
48 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
49 IPC_STRUCT_END()
50
51 IPC_STRUCT_BEGIN(IndexedDBMsg_ObserverChanges)
52 IPC_STRUCT_MEMBER(ObservationIndex, observation_index)
53 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Observation>, observations)
54 IPC_STRUCT_END()
55
56 // Indexed DB messages sent from the browser to the renderer.
57
58 // The thread_id needs to be the first parameter in these messages. In the IO
59 // thread on the renderer/client process, an IDB message filter assumes the
60 // thread_id is the first int.
61
62 // IDBDatabaseCallback message handlers
63 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksChanges,
64 int32_t, /* ipc_thread_id */
65 IndexedDBMsg_ObserverChanges)
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_enum_traits.cc ('k') | content/common/indexed_db/indexed_db_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698