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

Side by Side Diff: content/public/common/mojo_geoposition.mojom

Issue 1373883003: Move geolocation and permission mojoms into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « content/public/common/BUILD.gn ('k') | content/public/common/permission_status.mojom » ('j') | 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 // This file declares the Geoposition structure, used to represent a position
6 // fix. It was originally derived from:
7 // http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h
8 // TODO(blundell): Investigate killing content::Geoposition in favor of using
9 // this struct everywhere (and renaming it to Geoposition).
10
11 module content;
12
13 struct MojoGeoposition {
14 // These values follow the W3C geolocation specification and can be returned
15 // to JavaScript without the need for a conversion.
16 enum ErrorCode {
17 ERROR_CODE_NONE = 0, // Chrome addition.
18 ERROR_CODE_PERMISSION_DENIED = 1,
19 ERROR_CODE_POSITION_UNAVAILABLE = 2,
20 ERROR_CODE_TIMEOUT = 3,
21 ERROR_CODE_LAST = ERROR_CODE_TIMEOUT
22 };
23
24 // Whether this geoposition is valid.
25 bool valid;
26
27 // These properties correspond to those of the JavaScript Position object
28 // although their types may differ.
29 // Latitude in decimal degrees north (WGS84 coordinate frame).
30 double latitude;
31 // Longitude in decimal degrees west (WGS84 coordinate frame).
32 double longitude;
33 // Altitude in meters (above WGS84 datum).
34 double altitude;
35 // Accuracy of horizontal position in meters.
36 double accuracy;
37 // Accuracy of altitude in meters.
38 double altitude_accuracy;
39 // Heading in decimal degrees clockwise from true north.
40 double heading;
41 // Horizontal component of device velocity in meters per second.
42 double speed;
43 // TODO(blundell): If I need to represent this differently to use this
44 // struct to replace content::Geolocation, I'll need to convert
45 // correctly into seconds-since-epoch when using this in
46 // GeolocationDispatcher::OnLocationUpdate().
47 // Time of position measurement in seconds since Epoch in UTC time. This is
48 // taken from the host computer's system clock (i.e. from Time::Now(), not the
49 // source device's clock).
50 double timestamp;
51
52 // Error code, see enum above.
53 ErrorCode error_code;
54 // Human-readable error message.
55 string error_message;
56 };
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/public/common/permission_status.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698