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