| 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 // All of the types that follow are simple mappings of the types defined by the | 5 // All of the types that follow are simple mappings of the types defined by the |
| 6 // "Google Maps JavaScript API v3" defined here: | 6 // "Google Maps JavaScript API v3" defined here: |
| 7 // https://developers.google.com/maps/documentation/javascript/geocoding | 7 // https://developers.google.com/maps/documentation/javascript/geocoding |
| 8 | 8 |
| 9 module geocoder; | 9 module mojo; |
| 10 | 10 |
| 11 struct Location { | 11 import "location/public/interfaces/location.mojom"; |
| 12 float latitude; | |
| 13 float longitude; | |
| 14 }; | |
| 15 | 12 |
| 16 struct LocationType { | 13 struct LocationType { |
| 17 const string ROOFTOP = "ROOFTOP"; | 14 const string ROOFTOP = "ROOFTOP"; |
| 18 const string RANGE_INTERPOLATED = "RANGE_INTERPOLATED"; | 15 const string RANGE_INTERPOLATED = "RANGE_INTERPOLATED"; |
| 19 const string GEOMETRIC_CENTER = "GEOMETRIC_CENTER"; | 16 const string GEOMETRIC_CENTER = "GEOMETRIC_CENTER"; |
| 20 const string APPROXIMATE = "APPROXIMATE"; | 17 const string APPROXIMATE = "APPROXIMATE"; |
| 21 }; | 18 }; |
| 22 | 19 |
| 23 struct Bounds { | 20 struct Bounds { |
| 24 Location northeast; | 21 Location northeast; |
| 25 Location southwest; | 22 Location southwest; |
| 26 }; | 23 }; |
| 27 | 24 |
| 28 struct ComponentRestrictions { | 25 struct ComponentRestrictions { |
| 29 string? administrative_area; | 26 string? administrative_area; |
| 30 string? country; | 27 string? country; |
| 31 string? locality; | 28 string? locality; |
| 32 string? postal_code; | 29 string? postal_code; |
| 33 string? route; | 30 string? route; |
| 34 }; | 31 }; |
| 35 | 32 |
| 36 struct Options { | 33 struct Options { |
| 37 ComponentRestrictions? restrictions; | 34 ComponentRestrictions? restrictions; |
| 38 Location? location; | 35 Location? location; |
| 39 string? region; | 36 string? region; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 59 const string ZERO_RESULTS = "ZERO_RESULTS"; | 56 const string ZERO_RESULTS = "ZERO_RESULTS"; |
| 60 const string OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT"; | 57 const string OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT"; |
| 61 const string REQUEST_DENIED = "REQUEST_DENIED"; | 58 const string REQUEST_DENIED = "REQUEST_DENIED"; |
| 62 const string INVALID_REQUEST = "INVALID_REQUEST"; | 59 const string INVALID_REQUEST = "INVALID_REQUEST"; |
| 63 }; | 60 }; |
| 64 | 61 |
| 65 interface Geocoder { | 62 interface Geocoder { |
| 66 AddressToLocation(string address, Options? options) => (string status, array<R
esult>? results); | 63 AddressToLocation(string address, Options? options) => (string status, array<R
esult>? results); |
| 67 LocationToAddress(Location location, Options? options) => (string status, arra
y<Result>? results); | 64 LocationToAddress(Location location, Options? options) => (string status, arra
y<Result>? results); |
| 68 }; | 65 }; |
| OLD | NEW |