OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 // IPC message for geofencing | 5 // IPC message for geofencing |
6 | 6 |
7 #include "content/common/geofencing_status.h" | 7 #include "content/common/geofencing_types.h" |
8 #include "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" | 9 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" |
10 | 10 |
11 // Singly-included section for typedefs. | 11 // Singly-included section for typedefs. |
12 #ifndef CONTENT_COMMON_GEOFENCING_MESSAGES_H_ | 12 #ifndef CONTENT_COMMON_GEOFENCING_MESSAGES_H_ |
13 #define CONTENT_COMMON_GEOFENCING_MESSAGES_H_ | 13 #define CONTENT_COMMON_GEOFENCING_MESSAGES_H_ |
14 | 14 |
15 typedef std::map<std::string, blink::WebCircularGeofencingRegion> | 15 typedef std::map<std::string, blink::WebCircularGeofencingRegion> |
16 GeofencingRegistrations; | 16 GeofencingRegistrations; |
17 | 17 |
18 #endif // CONTENT_COMMON_GEOFENCING_MESSAGES_H_ | 18 #endif // CONTENT_COMMON_GEOFENCING_MESSAGES_H_ |
19 | 19 |
20 // Multiply-included message file, hence no include guard. | 20 // Multiply-included message file, hence no include guard. |
21 #define IPC_MESSAGE_START GeofencingMsgStart | 21 #define IPC_MESSAGE_START GeofencingMsgStart |
22 | 22 |
23 IPC_ENUM_TRAITS_MAX_VALUE(content::GeofencingStatus, | 23 IPC_ENUM_TRAITS_MAX_VALUE(content::GeofencingStatus, |
24 content::GEOFENCING_STATUS_LAST) | 24 content::GEOFENCING_STATUS_LAST) |
25 | 25 |
| 26 IPC_ENUM_TRAITS_MAX_VALUE(content::GeofencingMockState, |
| 27 content::GeofencingMockState::LAST) |
| 28 |
26 IPC_STRUCT_TRAITS_BEGIN(blink::WebCircularGeofencingRegion) | 29 IPC_STRUCT_TRAITS_BEGIN(blink::WebCircularGeofencingRegion) |
27 IPC_STRUCT_TRAITS_MEMBER(latitude) | 30 IPC_STRUCT_TRAITS_MEMBER(latitude) |
28 IPC_STRUCT_TRAITS_MEMBER(longitude) | 31 IPC_STRUCT_TRAITS_MEMBER(longitude) |
29 IPC_STRUCT_TRAITS_MEMBER(radius) | 32 IPC_STRUCT_TRAITS_MEMBER(radius) |
30 IPC_STRUCT_TRAITS_END() | 33 IPC_STRUCT_TRAITS_END() |
31 | 34 |
32 // Messages sent from the child process to the browser. | 35 // Messages sent from the child process to the browser. |
33 IPC_MESSAGE_CONTROL5(GeofencingHostMsg_RegisterRegion, | 36 IPC_MESSAGE_CONTROL5(GeofencingHostMsg_RegisterRegion, |
34 int /* thread_id */, | 37 int /* thread_id */, |
35 int /* request_id */, | 38 int /* request_id */, |
36 std::string /* region_id */, | 39 std::string /* region_id */, |
37 blink::WebCircularGeofencingRegion /* region */, | 40 blink::WebCircularGeofencingRegion /* region */, |
38 int64 /* serviceworker_registration_id */) | 41 int64 /* serviceworker_registration_id */) |
39 | 42 |
40 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_UnregisterRegion, | 43 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_UnregisterRegion, |
41 int /* thread_id */, | 44 int /* thread_id */, |
42 int /* request_id */, | 45 int /* request_id */, |
43 std::string /* region_id */, | 46 std::string /* region_id */, |
44 int64 /* serviceworker_registration_id */) | 47 int64 /* serviceworker_registration_id */) |
45 | 48 |
46 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_GetRegisteredRegions, | 49 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_GetRegisteredRegions, |
47 int /* thread_id */, | 50 int /* thread_id */, |
48 int /* request_id */, | 51 int /* request_id */, |
49 int64 /* serviceworker_registration_id */) | 52 int64 /* serviceworker_registration_id */) |
50 | 53 |
| 54 IPC_MESSAGE_CONTROL1(GeofencingHostMsg_SetMockProvider, |
| 55 content::GeofencingMockState /* mock_state */) |
| 56 |
| 57 IPC_MESSAGE_CONTROL2(GeofencingHostMsg_SetMockPosition, |
| 58 double /* latitude */, |
| 59 double /* longitude */) |
| 60 |
51 // Messages sent from the browser to the child process. | 61 // Messages sent from the browser to the child process. |
52 | 62 |
53 // Reply in response to GeofencingHostMsg_RegisterRegion | 63 // Reply in response to GeofencingHostMsg_RegisterRegion |
54 IPC_MESSAGE_CONTROL3(GeofencingMsg_RegisterRegionComplete, | 64 IPC_MESSAGE_CONTROL3(GeofencingMsg_RegisterRegionComplete, |
55 int /* thread_id */, | 65 int /* thread_id */, |
56 int /* request_id */, | 66 int /* request_id */, |
57 content::GeofencingStatus /* status */) | 67 content::GeofencingStatus /* status */) |
58 | 68 |
59 // Reply in response to GeofencingHostMsg_UnregisterRegion | 69 // Reply in response to GeofencingHostMsg_UnregisterRegion |
60 IPC_MESSAGE_CONTROL3(GeofencingMsg_UnregisterRegionComplete, | 70 IPC_MESSAGE_CONTROL3(GeofencingMsg_UnregisterRegionComplete, |
61 int /* thread_id */, | 71 int /* thread_id */, |
62 int /* request_id */, | 72 int /* request_id */, |
63 content::GeofencingStatus /* status */) | 73 content::GeofencingStatus /* status */) |
64 | 74 |
65 // Reply in response to GeofencingHostMsg_GetRegisteredRegions | 75 // Reply in response to GeofencingHostMsg_GetRegisteredRegions |
66 IPC_MESSAGE_CONTROL4(GeofencingMsg_GetRegisteredRegionsComplete, | 76 IPC_MESSAGE_CONTROL4(GeofencingMsg_GetRegisteredRegionsComplete, |
67 int /* thread_id */, | 77 int /* thread_id */, |
68 int /* request_id */, | 78 int /* request_id */, |
69 content::GeofencingStatus /* status */, | 79 content::GeofencingStatus /* status */, |
70 GeofencingRegistrations /* regions */) | 80 GeofencingRegistrations /* regions */) |
OLD | NEW |