| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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 [DartPackage="mojo_services"] | |
| 6 module mojo; | |
| 7 | |
| 8 import "location/public/interfaces/location.mojom"; | |
| 9 | |
| 10 // LocationService provides updates on the device's location. | |
| 11 // NOTE: This is specifically targetted towards use on Android by | |
| 12 // implementations which are thin wrappers over the Android Location API or the | |
| 13 // Google Play Services Location API. If we ever want to expand this to multiple | |
| 14 // platforms or if it starts growing in complexity, we should strongly consider | |
| 15 // use of Chromium's geolocation code. | |
| 16 interface LocationService { | |
| 17 enum UpdatePriority { | |
| 18 // Use this setting to request location precision to within a city block. | |
| 19 PRIORITY_BALANCED_POWER_ACCURACY, | |
| 20 // Use this setting to request the most precise location possible. | |
| 21 PRIORITY_HIGH_ACCURACY, | |
| 22 // Use this setting to request city-level precision. | |
| 23 PRIORITY_LOW_POWER, | |
| 24 // Use this setting if you need negligible impact on power consumption, | |
| 25 // but want to receive location updates when available. | |
| 26 PRIORITY_NO_POWER, | |
| 27 }; | |
| 28 | |
| 29 // Returns a location when it changes, based on |priority|. If this is the | |
| 30 // initial call, the last known location is returned immediately, if | |
| 31 // available. | |
| 32 // Returns NULL if the client requests a new location while a request is | |
| 33 // already in flight. | |
| 34 GetNextLocation(UpdatePriority priority) => (Location? location); | |
| 35 }; | |
| OLD | NEW |