Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 // IPC message for geofencing | |
| 6 // Multiply-included message file, hence no include guard. | |
| 7 | |
| 8 #include "content/common/geofencing_status.h" | |
| 9 #include "ipc/ipc_message_macros.h" | |
| 10 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" | |
| 11 | |
| 12 #define IPC_MESSAGE_START GeofencingMsgStart | |
| 13 | |
| 14 IPC_ENUM_TRAITS_MAX_VALUE(content::GeofencingStatus, | |
| 15 content::GEOFENCING_STATUS_LAST) | |
| 16 | |
| 17 IPC_STRUCT_TRAITS_BEGIN(blink::WebCircularGeofencingRegion) | |
| 18 IPC_STRUCT_TRAITS_MEMBER(latitude) | |
| 19 IPC_STRUCT_TRAITS_MEMBER(longitude) | |
| 20 IPC_STRUCT_TRAITS_MEMBER(radius) | |
| 21 IPC_STRUCT_TRAITS_END() | |
| 22 | |
| 23 typedef std::map<std::string, blink::WebCircularGeofencingRegion> | |
| 24 GeofencingRegistrations; | |
| 25 | |
| 26 // Messages sent from the child process to the browser. | |
| 27 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_RegisterRegion, | |
| 28 int /* thread_id */, | |
| 29 int /* request_id */, | |
| 30 std::string /* region_id */, | |
|
palmer
2014/09/25 19:44:12
What is the lexical/syntactic structure of these s
Marijn Kruisselbrink
2014/09/25 19:55:23
Currently these strings are completely unrestricte
| |
| 31 blink::WebCircularGeofencingRegion /* region */) | |
| 32 | |
| 33 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_UnregisterRegion, | |
| 34 int /* thread_id */, | |
| 35 int /* request_id */, | |
| 36 std::string /* regionId */) | |
|
palmer
2014/09/25 19:44:12
Nit: "region_id"
Marijn Kruisselbrink
2014/09/25 19:55:23
Done.
| |
| 37 | |
| 38 IPC_MESSAGE_CONTROL2(GeofencingHostMsg_GetRegisteredRegions, | |
| 39 int /* thread_id */, | |
| 40 int /* request_id */) | |
| 41 | |
| 42 // Messages sent from the browser to the child process. | |
| 43 | |
| 44 // Reply in response to GeofencingHostMsg_RegisterRegion | |
| 45 IPC_MESSAGE_CONTROL3(GeofencingMsg_RegisterRegionComplete, | |
| 46 int /* thread_id */, | |
| 47 int /* request_id */, | |
| 48 content::GeofencingStatus /* status */) | |
| 49 | |
| 50 // Reply in response to GeofencingHostMsg_UnregisterRegion | |
| 51 IPC_MESSAGE_CONTROL3(GeofencingMsg_UnregisterRegionComplete, | |
| 52 int /* thread_id */, | |
| 53 int /* request_id */, | |
| 54 content::GeofencingStatus /* status */) | |
| 55 | |
| 56 // Reply in response to GeofencingHostMsg_GetRegisteredRegions | |
| 57 IPC_MESSAGE_CONTROL4(GeofencingMsg_GetRegisteredRegionsComplete, | |
| 58 int /* thread_id */, | |
| 59 int /* request_id */, | |
| 60 content::GeofencingStatus /* status */, | |
| 61 GeofencingRegistrations /* regions */) | |
| OLD | NEW |