Apply _RELATIVE relocations ahead of others.
[chromium-blink-merge.git] / content / common / geolocation_messages.h
blobb66a1919b7986c8f6feb9f70b32628f2d97bb109
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
3 // found in the LICENSE file.
5 // IPC messages for geolocation.
6 // Multiply-included message file, hence no include guard.
8 #include "content/public/common/geoposition.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "url/gurl.h"
12 #define IPC_MESSAGE_START GeolocationMsgStart
14 IPC_ENUM_TRAITS_MAX_VALUE(content::Geoposition::ErrorCode,
15 content::Geoposition::ERROR_CODE_LAST)
17 IPC_STRUCT_TRAITS_BEGIN(content::Geoposition)
18 IPC_STRUCT_TRAITS_MEMBER(latitude)
19 IPC_STRUCT_TRAITS_MEMBER(longitude)
20 IPC_STRUCT_TRAITS_MEMBER(altitude)
21 IPC_STRUCT_TRAITS_MEMBER(accuracy)
22 IPC_STRUCT_TRAITS_MEMBER(altitude_accuracy)
23 IPC_STRUCT_TRAITS_MEMBER(heading)
24 IPC_STRUCT_TRAITS_MEMBER(speed)
25 IPC_STRUCT_TRAITS_MEMBER(timestamp)
26 IPC_STRUCT_TRAITS_MEMBER(error_code)
27 IPC_STRUCT_TRAITS_MEMBER(error_message)
28 IPC_STRUCT_TRAITS_END()
30 // Messages sent from the browser to the renderer.
32 // Reply in response to GeolocationHostMsg_RequestPermission.
33 IPC_MESSAGE_ROUTED2(GeolocationMsg_PermissionSet,
34 int /* bridge_id */,
35 bool /* is_allowed */)
37 // Messages sent from the renderer to the browser.
39 // The |bridge_id| representing |host| is requesting permission to access
40 // geolocation position. This will be replied by GeolocationMsg_PermissionSet.
41 // TODO(mlamouri): |origin| should be a security origin to guarantee that a
42 // proper origin is passed.
43 IPC_MESSAGE_ROUTED3(GeolocationHostMsg_RequestPermission,
44 int /* bridge_id */,
45 GURL /* origin in the frame requesting geolocation */,
46 bool /* user_gesture */)