Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom

Issue 2201883003: Geolocation: move mojom from WebKit to device/geolocation/public/interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ortuno@s and rockot@s comments, tiny rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/platform/modules/geolocation/OWNERS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 module blink.mojom;
6
7 // A Geoposition represents a position fix. It was originally derived from:
8 // http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h
9 // TODO(blundell): Investigate killing content::Geoposition in favor of using
10 // this struct everywhere.
11 struct Geoposition {
12 // These values follow the W3C geolocation specification and can be returned
13 // to JavaScript without the need for a conversion.
14 enum ErrorCode {
15 NONE = 0, // Chrome addition.
16 PERMISSION_DENIED = 1,
17 POSITION_UNAVAILABLE = 2,
18 TIMEOUT = 3,
19 LAST = TIMEOUT
20 };
21
22 // Whether this geoposition is valid.
23 bool valid;
24
25 // These properties correspond to those of the JavaScript Position object
26 // although their types may differ.
27 // Latitude in decimal degrees north (WGS84 coordinate frame).
28 double latitude;
29 // Longitude in decimal degrees west (WGS84 coordinate frame).
30 double longitude;
31 // Altitude in meters (above WGS84 datum).
32 double altitude;
33 // Accuracy of horizontal position in meters.
34 double accuracy;
35 // Accuracy of altitude in meters.
36 double altitude_accuracy;
37 // Heading in decimal degrees clockwise from true north.
38 double heading;
39 // Horizontal component of device velocity in meters per second.
40 double speed;
41 // TODO(blundell): If I need to represent this differently to use this
42 // struct to replace content::Geolocation, I'll need to convert
43 // correctly into seconds-since-epoch when using this in
44 // GeolocationDispatcher::OnLocationUpdate().
45 // Time of position measurement in seconds since Epoch in UTC time. This is
46 // taken from the host computer's system clock (i.e. from Time::Now(), not the
47 // source device's clock).
48 double timestamp;
49
50 // Error code, see enum above.
51 ErrorCode error_code;
52 // Human-readable error message.
53 string error_message;
54 };
55
56 // The Geolocation service provides updates on the device's location. By
57 // default, it provides updates with low accuracy, but |SetHighAccuracy()| may
58 // be called to change this.
59 interface GeolocationService {
60 SetHighAccuracy(bool high_accuracy);
61
62 // Position is reported once it changes or immediately (to report the initial
63 // position) if this is the first call to QueryNextPosition on this instance.
64 // Position updates may be throttled by the service. Overlapping calls to
65 // this method are prohibited and will be treated as a connection error.
66 QueryNextPosition() => (Geoposition geoposition);
67 };
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/modules/geolocation/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698