OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 Position structure, which is used to represent a | 5 // This file declares the Position structure, which is used to represent a |
6 // position fix. Originally derived from | 6 // position fix. 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 CHROME_COMMON_GEOPOSITION_H_ | 9 #ifndef CONTENT_COMMON_GEOPOSITION_H_ |
10 #define CHROME_COMMON_GEOPOSITION_H_ | 10 #define CONTENT_COMMON_GEOPOSITION_H_ |
11 #pragma once | 11 #pragma once |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 | 15 |
16 // The internal representation of a geo position. Some properties use different | 16 // The internal representation of a geo position. Some properties use different |
17 // types when passed to JavaScript. | 17 // types when passed to JavaScript. |
18 struct Geoposition { | 18 struct Geoposition { |
19 public: | 19 public: |
20 // Error codes for returning to JavaScript. These values are defined by the | 20 // Error codes for returning to JavaScript. These values are defined by the |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 double speed; // In meters per second | 55 double speed; // In meters per second |
56 // Timestamp for this position fix object taken from the host computer's | 56 // Timestamp for this position fix object taken from the host computer's |
57 // system clock (i.e. from Time::Now(), not the source device's clock). | 57 // system clock (i.e. from Time::Now(), not the source device's clock). |
58 base::Time timestamp; | 58 base::Time timestamp; |
59 | 59 |
60 // These properties are returned to JavaScript as a PositionError object. | 60 // These properties are returned to JavaScript as a PositionError object. |
61 ErrorCode error_code; | 61 ErrorCode error_code; |
62 std::string error_message; // Human-readable error message | 62 std::string error_message; // Human-readable error message |
63 }; | 63 }; |
64 | 64 |
65 #endif // CHROME_COMMON_GEOPOSITION_H_ | 65 #endif // CONTENT_COMMON_GEOPOSITION_H_ |
OLD | NEW |