OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // TODO(vadimt): Consider reusing WebKit/Blink types, if this is possible. |
4 | 5 |
5 // TODO(vadimt): Consider reusing WebKit/Blink types, if this is possible. | 6 // The <code>chrome.location</code> API augments the events from the |
| 7 // <a href="http://dev.w3.org/geo/api/spec-source.html">HTML Geolocation API</a> |
| 8 // to be event page compatible. |
6 namespace location { | 9 namespace location { |
7 // Coordinates part of the Location object. | 10 // Coordinates part of the Location object. |
8 dictionary Coordinates { | 11 dictionary Coordinates { |
9 // The geographic latitude specified in degrees. | 12 // The geographic latitude specified in degrees. |
10 double latitude; | 13 double latitude; |
11 | 14 |
12 // The geographic longitude specified in degrees. | 15 // The geographic longitude specified in degrees. |
13 double longitude; | 16 double longitude; |
14 | 17 |
15 // The height of the position, specified in meters above the [WGS84] | 18 // The height of the position, specified in meters above the [WGS84] |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 interface Events { | 89 interface Events { |
87 // Fired when a location change is detected. | 90 // Fired when a location change is detected. |
88 // |location| : An object containing matching events and new location. | 91 // |location| : An object containing matching events and new location. |
89 static void onLocationUpdate(Location location); | 92 static void onLocationUpdate(Location location); |
90 | 93 |
91 // Fired when detecting location in not possible. | 94 // Fired when detecting location in not possible. |
92 // |error| : Human-readable error description. | 95 // |error| : Human-readable error description. |
93 static void onLocationError(DOMString error); | 96 static void onLocationError(DOMString error); |
94 }; | 97 }; |
95 }; | 98 }; |
OLD | NEW |