OLD | NEW |
1 // Copyright (c) 2012 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/public/common/geoposition.h" | 8 #include "content/public/common/geoposition.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 IPC_STRUCT_TRAITS_MEMBER(error_message) | 27 IPC_STRUCT_TRAITS_MEMBER(error_message) |
28 IPC_STRUCT_TRAITS_END() | 28 IPC_STRUCT_TRAITS_END() |
29 | 29 |
30 // Messages sent from the browser to the renderer. | 30 // Messages sent from the browser to the renderer. |
31 | 31 |
32 // Reply in response to GeolocationHostMsg_RequestPermission. | 32 // Reply in response to GeolocationHostMsg_RequestPermission. |
33 IPC_MESSAGE_ROUTED2(GeolocationMsg_PermissionSet, | 33 IPC_MESSAGE_ROUTED2(GeolocationMsg_PermissionSet, |
34 int /* bridge_id */, | 34 int /* bridge_id */, |
35 bool /* is_allowed */) | 35 bool /* is_allowed */) |
36 | 36 |
37 // Sent after GeolocationHostMsg_StartUpdating iff the user has granted | |
38 // permission and we have a position available or an error occurs (such as | |
39 // permission denied, position unavailable, etc.) | |
40 IPC_MESSAGE_ROUTED1(GeolocationMsg_PositionUpdated, | |
41 content::Geoposition /* geoposition */) | |
42 | |
43 // Messages sent from the renderer to the browser. | 37 // Messages sent from the renderer to the browser. |
44 | 38 |
45 // The |bridge_id| representing |host| is requesting permission to access | 39 // The |bridge_id| representing |host| is requesting permission to access |
46 // geolocation position. This will be replied by GeolocationMsg_PermissionSet. | 40 // geolocation position. This will be replied by GeolocationMsg_PermissionSet. |
47 // TODO(mlamouri): |origin| should be a security origin to guarantee that a | 41 // TODO(mlamouri): |origin| should be a security origin to guarantee that a |
48 // proper origin is passed. | 42 // proper origin is passed. |
49 IPC_MESSAGE_ROUTED3(GeolocationHostMsg_RequestPermission, | 43 IPC_MESSAGE_ROUTED3(GeolocationHostMsg_RequestPermission, |
50 int /* bridge_id */, | 44 int /* bridge_id */, |
51 GURL /* origin in the frame requesting geolocation */, | 45 GURL /* origin in the frame requesting geolocation */, |
52 bool /* user_gesture */) | 46 bool /* user_gesture */) |
53 | |
54 // The render view requests the Geolocation service to start updating. | |
55 // This is an asynchronous call, and the browser process may eventually reply | |
56 // with the updated geoposition, or an error (access denied, location | |
57 // unavailable, etc.) | |
58 IPC_MESSAGE_ROUTED2(GeolocationHostMsg_StartUpdating, | |
59 GURL /* origin in the frame requesting geolocation */, | |
60 bool /* enable_high_accuracy */) | |
61 | |
62 // The render view requests Geolocation service to stop updating. | |
63 // Note that the geolocation service may continue to fetch geolocation data | |
64 // for other origins. | |
65 IPC_MESSAGE_ROUTED0(GeolocationHostMsg_StopUpdating) | |
OLD | NEW |