OLD | NEW |
1 // Copyright (c) 2011 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 // IPC messages for geolocation. | 5 // IPC messages for geolocation. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "content/common/geoposition.h" | 8 #include "content/public/common/geoposition.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 | 11 |
12 #define IPC_MESSAGE_START GeolocationMsgStart | 12 #define IPC_MESSAGE_START GeolocationMsgStart |
13 | 13 |
14 IPC_ENUM_TRAITS(Geoposition::ErrorCode) | 14 IPC_ENUM_TRAITS(content::Geoposition::ErrorCode) |
15 | 15 |
16 IPC_STRUCT_TRAITS_BEGIN(Geoposition) | 16 IPC_STRUCT_TRAITS_BEGIN(content::Geoposition) |
17 IPC_STRUCT_TRAITS_MEMBER(latitude) | 17 IPC_STRUCT_TRAITS_MEMBER(latitude) |
18 IPC_STRUCT_TRAITS_MEMBER(longitude) | 18 IPC_STRUCT_TRAITS_MEMBER(longitude) |
19 IPC_STRUCT_TRAITS_MEMBER(altitude) | 19 IPC_STRUCT_TRAITS_MEMBER(altitude) |
20 IPC_STRUCT_TRAITS_MEMBER(accuracy) | 20 IPC_STRUCT_TRAITS_MEMBER(accuracy) |
21 IPC_STRUCT_TRAITS_MEMBER(altitude_accuracy) | 21 IPC_STRUCT_TRAITS_MEMBER(altitude_accuracy) |
22 IPC_STRUCT_TRAITS_MEMBER(heading) | 22 IPC_STRUCT_TRAITS_MEMBER(heading) |
23 IPC_STRUCT_TRAITS_MEMBER(speed) | 23 IPC_STRUCT_TRAITS_MEMBER(speed) |
24 IPC_STRUCT_TRAITS_MEMBER(timestamp) | 24 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
25 IPC_STRUCT_TRAITS_MEMBER(error_code) | 25 IPC_STRUCT_TRAITS_MEMBER(error_code) |
26 IPC_STRUCT_TRAITS_MEMBER(error_message) | 26 IPC_STRUCT_TRAITS_MEMBER(error_message) |
27 IPC_STRUCT_TRAITS_END() | 27 IPC_STRUCT_TRAITS_END() |
28 | 28 |
29 // Messages sent from the browser to the renderer. | 29 // Messages sent from the browser to the renderer. |
30 | 30 |
31 // Reply in response to GeolocationHostMsg_RequestPermission. | 31 // Reply in response to GeolocationHostMsg_RequestPermission. |
32 IPC_MESSAGE_ROUTED2(GeolocationMsg_PermissionSet, | 32 IPC_MESSAGE_ROUTED2(GeolocationMsg_PermissionSet, |
33 int /* bridge_id */, | 33 int /* bridge_id */, |
34 bool /* is_allowed */) | 34 bool /* is_allowed */) |
35 | 35 |
36 // Sent after GeolocationHostMsg_StartUpdating iff the user has granted | 36 // Sent after GeolocationHostMsg_StartUpdating iff the user has granted |
37 // permission and we have a position available or an error occurs (such as | 37 // permission and we have a position available or an error occurs (such as |
38 // permission denied, position unavailable, etc.) | 38 // permission denied, position unavailable, etc.) |
39 IPC_MESSAGE_ROUTED1(GeolocationMsg_PositionUpdated, | 39 IPC_MESSAGE_ROUTED1(GeolocationMsg_PositionUpdated, |
40 Geoposition /* geoposition */) | 40 content::Geoposition /* geoposition */) |
41 | 41 |
42 // Messages sent from the renderer to the browser. | 42 // Messages sent from the renderer to the browser. |
43 | 43 |
44 // The |render_view_id| and |bridge_id| representing |host| is requesting | 44 // The |render_view_id| and |bridge_id| representing |host| is requesting |
45 // permission to access geolocation position. | 45 // permission to access geolocation position. |
46 // This will be replied by GeolocationMsg_PermissionSet. | 46 // This will be replied by GeolocationMsg_PermissionSet. |
47 IPC_MESSAGE_CONTROL3(GeolocationHostMsg_RequestPermission, | 47 IPC_MESSAGE_CONTROL3(GeolocationHostMsg_RequestPermission, |
48 int /* render_view_id */, | 48 int /* render_view_id */, |
49 int /* bridge_id */, | 49 int /* bridge_id */, |
50 GURL /* GURL of the frame requesting geolocation */) | 50 GURL /* GURL of the frame requesting geolocation */) |
(...skipping 12 matching lines...) Expand all Loading... |
63 IPC_MESSAGE_CONTROL3(GeolocationHostMsg_StartUpdating, | 63 IPC_MESSAGE_CONTROL3(GeolocationHostMsg_StartUpdating, |
64 int /* render_view_id */, | 64 int /* render_view_id */, |
65 GURL /* GURL of the frame requesting geolocation */, | 65 GURL /* GURL of the frame requesting geolocation */, |
66 bool /* enable_high_accuracy */) | 66 bool /* enable_high_accuracy */) |
67 | 67 |
68 // The |render_view_id| requests Geolocation service to stop updating. | 68 // The |render_view_id| requests Geolocation service to stop updating. |
69 // Note that the geolocation service may continue to fetch geolocation data | 69 // Note that the geolocation service may continue to fetch geolocation data |
70 // for other origins. | 70 // for other origins. |
71 IPC_MESSAGE_CONTROL1(GeolocationHostMsg_StopUpdating, | 71 IPC_MESSAGE_CONTROL1(GeolocationHostMsg_StopUpdating, |
72 int /* render_view_id */) | 72 int /* render_view_id */) |
OLD | NEW |