Index: third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom |
diff --git a/content/public/common/mojo_geoposition.mojom b/third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom |
similarity index 71% |
rename from content/public/common/mojo_geoposition.mojom |
rename to third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom |
index d85091af6e5243e0fe3e8e30ba069b164e534178..165192321e8d1c65463122bb3304edb77df26540 100644 |
--- a/content/public/common/mojo_geoposition.mojom |
+++ b/third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom |
@@ -2,15 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// This file declares the Geoposition structure, used to represent a position |
-// fix. It was originally derived from: |
+module blink.mojom; |
+ |
+// A Geoposition represents a position fix. It was originally derived from: |
// http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h |
// TODO(blundell): Investigate killing content::Geoposition in favor of using |
-// this struct everywhere (and renaming it to Geoposition). |
- |
-module content.mojom; |
- |
-struct MojoGeoposition { |
+// this struct everywhere. |
+struct Geoposition { |
// These values follow the W3C geolocation specification and can be returned |
// to JavaScript without the need for a conversion. |
enum ErrorCode { |
@@ -54,3 +52,16 @@ struct MojoGeoposition { |
// Human-readable error message. |
string error_message; |
}; |
+ |
+// The Geolocation service provides updates on the device's location. By |
+// default, it provides updates with low accuracy, but |SetHighAccuracy()| may |
+// be called to change this. |
+interface GeolocationService { |
+ SetHighAccuracy(bool high_accuracy); |
+ |
+ // Position is reported once it changes or immediately (to report the initial |
+ // position) if this is the first call to QueryNextPosition on this instance. |
+ // Position updates may be throttled by the service. Overlapping calls to |
+ // this method are prohibited and will be treated as a connection error. |
+ QueryNextPosition() => (Geoposition geoposition); |
+}; |