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

Side by Side Diff: content/public/common/geoposition.h

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapping to address InfoBar currying callback case Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 8
9 #ifndef CONTENT_PUBLIC_COMMON_GEOPOSITION_H_ 9 #ifndef CONTENT_PUBLIC_COMMON_GEOPOSITION_H_
10 #define CONTENT_PUBLIC_COMMON_GEOPOSITION_H_ 10 #define CONTENT_PUBLIC_COMMON_GEOPOSITION_H_
(...skipping 17 matching lines...) Expand all
28 ERROR_CODE_LAST = ERROR_CODE_TIMEOUT 28 ERROR_CODE_LAST = ERROR_CODE_TIMEOUT
29 }; 29 };
30 30
31 // All fields are initialized to sentinel values marking them as invalid. The 31 // All fields are initialized to sentinel values marking them as invalid. The
32 // error code is set to ERROR_CODE_NONE. 32 // error code is set to ERROR_CODE_NONE.
33 Geoposition(); 33 Geoposition();
34 34
35 // A valid fix has a valid latitude, longitude, accuracy and timestamp. 35 // A valid fix has a valid latitude, longitude, accuracy and timestamp.
36 bool Validate() const; 36 bool Validate() const;
37 37
38 // Modify the geolocation to apply the user's precision preference.
39 Geoposition ApplyPrecision(const int choice) const;
meacer 2014/08/15 22:20:25 As I said earlier, this would be better as a stati
mhm 2014/08/15 23:18:57 Done.
40
38 // These properties correspond to those of the JavaScript Position object 41 // These properties correspond to those of the JavaScript Position object
39 // although their types may differ. 42 // although their types may differ.
40 // Latitude in decimal degrees north (WGS84 coordinate frame). 43 // Latitude in decimal degrees north (WGS84 coordinate frame).
41 double latitude; 44 double latitude;
42 // Longitude in decimal degrees west (WGS84 coordinate frame). 45 // Longitude in decimal degrees west (WGS84 coordinate frame).
43 double longitude; 46 double longitude;
44 // Altitude in meters (above WGS84 datum). 47 // Altitude in meters (above WGS84 datum).
45 double altitude; 48 double altitude;
46 // Accuracy of horizontal position in meters. 49 // Accuracy of horizontal position in meters.
47 double accuracy; 50 double accuracy;
(...skipping 10 matching lines...) Expand all
58 61
59 // Error code, see enum above. 62 // Error code, see enum above.
60 ErrorCode error_code; 63 ErrorCode error_code;
61 // Human-readable error message. 64 // Human-readable error message.
62 std::string error_message; 65 std::string error_message;
63 }; 66 };
64 67
65 } // namespace content 68 } // namespace content
66 69
67 #endif // CONTENT_COMMON_GEOPOSITION_H_ 70 #endif // CONTENT_COMMON_GEOPOSITION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698