diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 19:33:11 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 19:33:11 +0000 |
commit | 9384d383165e6e99e4430d9074a754ccebed34f9 (patch) | |
tree | 1dead35ee35b5b4119d713fe30f29586573d5b8e /chrome/common/geoposition.h | |
parent | e989df19ef4bce3cd257ef77c19b0f3f4e1376bd (diff) | |
download | chromium_src-9384d383165e6e99e4430d9074a754ccebed34f9.zip chromium_src-9384d383165e6e99e4430d9074a754ccebed34f9.tar.gz chromium_src-9384d383165e6e99e4430d9074a754ccebed34f9.tar.bz2 |
Revert 39366 - Initial Geolocation implementation
Adds IPC plumbing.
Adds Infobar buttons for requesting permission
TEST=geolocation_browsertest.cc
Review URL: http://codereview.chromium.org/548188
TBR=bulach@chromium.org
Review URL: http://codereview.chromium.org/646027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/geoposition.h')
-rw-r--r-- | chrome/common/geoposition.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/chrome/common/geoposition.h b/chrome/common/geoposition.h deleted file mode 100644 index 94c1dc9..0000000 --- a/chrome/common/geoposition.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file declares the Position structure, which is used to represent a -// position fix. Originally derived from -// http://gears.googlecode.com/svn/trunk/gears/geolocation/geolocation.h - -#ifndef CHROME_COMMON_GEOPOSITION_H_ -#define CHROME_COMMON_GEOPOSITION_H_ - -#include "base/string16.h" - -// The internal representation of a geo position. Some properties use different -// types when passed to JavaScript. -struct Geoposition { - public: - // Error codes for returning to JavaScript. These values are defined by the - // W3C spec. Note that Gears does not use all of these codes, but we need - // values for all of them to allow us to provide the constants on the error - // object. - enum ErrorCode { - ERROR_CODE_NONE = 0, // Chrome addition - ERROR_CODE_PERMISSION_DENIED = 1, - ERROR_CODE_POSITION_UNAVAILABLE = 2, - ERROR_CODE_TIMEOUT = 3, - }; - - Geoposition(); - - bool is_valid_latlong() const; - bool is_valid_altitude() const; - bool is_valid_accuracy() const; - bool is_valid_altitude_accuracy() const; - bool is_valid_heading() const; - bool is_valid_speed() const; - bool is_valid_timestamp() const; - - // A valid fix has a valid latitude, longitude, accuracy and timestamp. - bool IsValidFix() const; - - // A position is considered initialized if it has either a valid fix or - // an error code other than NONE. - bool IsInitialized() const; - - // These properties correspond to the JavaScript Position object. - double latitude; // In degrees - double longitude; // In degrees - double altitude; // In metres - double accuracy; // In metres - double altitude_accuracy; // In metres - double heading; // In degrees clockwise relative to the true north - double speed; // In meters per second - int64 timestamp; // Milliseconds since 1st Jan 1970 - - // These properties are returned to JavaScript as a PositionError object. - ErrorCode error_code; - std::wstring error_message; // Human-readable error message -}; - -#endif // CHROME_COMMON_GEOPOSITION_H_ |