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

Side by Side Diff: components/geolocation/public/interfaces/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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 4
5 // This file declares the Geoposition structure, used to represent a position 5 // This file declares the Geoposition structure, used to represent a position
6 // fix. It was originally derived from: 6 // fix. It was originally derived from:
7 // http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h 7 // http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h
8 // TODO(blundell): Investigate killing content::Geoposition in favor of using 8 // TODO(blundell): Investigate killing content::Geoposition in favor of using
9 // this struct everywhere (and renaming it to Geoposition). 9 // this struct everywhere (and renaming it to Geoposition).
10 10
11 module content; 11 module geolocation;
12 12
13 struct MojoGeoposition { 13 struct Geoposition {
14 // These values follow the W3C geolocation specification and can be returned 14 // These values follow the W3C geolocation specification and can be returned
15 // to JavaScript without the need for a conversion. 15 // to JavaScript without the need for a conversion.
16 enum ErrorCode { 16 enum ErrorCode {
17 ERROR_CODE_NONE = 0, // Chrome addition. 17 NONE = 0, // Chrome addition.
18 ERROR_CODE_PERMISSION_DENIED = 1, 18 PERMISSION_DENIED = 1,
19 ERROR_CODE_POSITION_UNAVAILABLE = 2, 19 POSITION_UNAVAILABLE = 2,
20 ERROR_CODE_TIMEOUT = 3, 20 TIMEOUT = 3,
21 ERROR_CODE_LAST = ERROR_CODE_TIMEOUT 21 LAST = TIMEOUT
22 }; 22 };
23 23
24 // Whether this geoposition is valid. 24 // Whether this geoposition is valid.
25 bool valid; 25 bool valid;
26 26
27 // These properties correspond to those of the JavaScript Position object 27 // These properties correspond to those of the JavaScript Position object
28 // although their types may differ. 28 // although their types may differ.
29 // Latitude in decimal degrees north (WGS84 coordinate frame). 29 // Latitude in decimal degrees north (WGS84 coordinate frame).
30 double latitude; 30 double latitude;
31 // Longitude in decimal degrees west (WGS84 coordinate frame). 31 // Longitude in decimal degrees west (WGS84 coordinate frame).
(...skipping 15 matching lines...) Expand all
47 // Time of position measurement in seconds since Epoch in UTC time. This is 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 48 // taken from the host computer's system clock (i.e. from Time::Now(), not the
49 // source device's clock). 49 // source device's clock).
50 double timestamp; 50 double timestamp;
51 51
52 // Error code, see enum above. 52 // Error code, see enum above.
53 ErrorCode error_code; 53 ErrorCode error_code;
54 // Human-readable error message. 54 // Human-readable error message.
55 string error_message; 55 string error_message;
56 }; 56 };
OLDNEW
« no previous file with comments | « components/geolocation/public/interfaces/geolocation_interfaces.gyp ('k') | components/permission/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698