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
,
36 std::string
/* region_id */,
37 blink::WebCircularGeofencingRegion
/* region */,
38 int64
/* serviceworker_registration_id */)
40 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_UnregisterRegion
,
43 std::string
/* region_id */,
44 int64
/* serviceworker_registration_id */)
46 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_GetRegisteredRegions
,
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
,
57 content::GeofencingStatus
/* status */)
59 // Reply in response to GeofencingHostMsg_UnregisterRegion
60 IPC_MESSAGE_CONTROL3(GeofencingMsg_UnregisterRegionComplete
,
63 content::GeofencingStatus
/* status */)
65 // Reply in response to GeofencingHostMsg_GetRegisteredRegions
66 IPC_MESSAGE_CONTROL4(GeofencingMsg_GetRegisteredRegionsComplete
,
69 content::GeofencingStatus
/* status */,
70 GeofencingRegistrations
/* regions */)