Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / common / geofencing_messages.h
blob152b108e0dcd301c2bd5da62de6636611b9e0055
1 // Copyright 2014 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.
5 // IPC message for geofencing
7 #include "content/common/geofencing_status.h"
8 #include "ipc/ipc_message_macros.h"
9 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h"
11 // Singly-included section for typedefs.
12 #ifndef CONTENT_COMMON_GEOFENCING_MESSAGES_H_
13 #define CONTENT_COMMON_GEOFENCING_MESSAGES_H_
15 typedef std::map<std::string, blink::WebCircularGeofencingRegion>
16 GeofencingRegistrations;
18 #endif // CONTENT_COMMON_GEOFENCING_MESSAGES_H_
20 // Multiply-included message file, hence no include guard.
21 #define IPC_MESSAGE_START GeofencingMsgStart
23 IPC_ENUM_TRAITS_MAX_VALUE(content::GeofencingStatus,
24 content::GEOFENCING_STATUS_LAST)
26 IPC_STRUCT_TRAITS_BEGIN(blink::WebCircularGeofencingRegion)
27 IPC_STRUCT_TRAITS_MEMBER(latitude)
28 IPC_STRUCT_TRAITS_MEMBER(longitude)
29 IPC_STRUCT_TRAITS_MEMBER(radius)
30 IPC_STRUCT_TRAITS_END()
32 // Messages sent from the child process to the browser.
33 IPC_MESSAGE_CONTROL5(GeofencingHostMsg_RegisterRegion,
34 int /* thread_id */,
35 int /* request_id */,
36 std::string /* region_id */,
37 blink::WebCircularGeofencingRegion /* region */,
38 int64 /* serviceworker_registration_id */)
40 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_UnregisterRegion,
41 int /* thread_id */,
42 int /* request_id */,
43 std::string /* region_id */,
44 int64 /* serviceworker_registration_id */)
46 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_GetRegisteredRegions,
47 int /* thread_id */,
48 int /* request_id */,
49 int64 /* serviceworker_registration_id */)
51 // Messages sent from the browser to the child process.
53 // Reply in response to GeofencingHostMsg_RegisterRegion
54 IPC_MESSAGE_CONTROL3(GeofencingMsg_RegisterRegionComplete,
55 int /* thread_id */,
56 int /* request_id */,
57 content::GeofencingStatus /* status */)
59 // Reply in response to GeofencingHostMsg_UnregisterRegion
60 IPC_MESSAGE_CONTROL3(GeofencingMsg_UnregisterRegionComplete,
61 int /* thread_id */,
62 int /* request_id */,
63 content::GeofencingStatus /* status */)
65 // Reply in response to GeofencingHostMsg_GetRegisteredRegions
66 IPC_MESSAGE_CONTROL4(GeofencingMsg_GetRegisteredRegionsComplete,
67 int /* thread_id */,
68 int /* request_id */,
69 content::GeofencingStatus /* status */,
70 GeofencingRegistrations /* regions */)