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/common_param_traits.cc | |
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/common_param_traits.cc')
-rw-r--r-- | chrome/common/common_param_traits.cc | 63 |
1 files changed, 1 insertions, 62 deletions
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc index 62e57ff..e213f6d 100644 --- a/chrome/common/common_param_traits.cc +++ b/chrome/common/common_param_traits.cc @@ -245,66 +245,5 @@ void ParamTraits<webkit_glue::WebApplicationInfo>::Log( l->append(L"<WebApplicationInfo>"); } -void ParamTraits<Geoposition::ErrorCode>::Write( - Message* m, const Geoposition::ErrorCode& p) { - int error_code = p; - WriteParam(m, error_code); -} - -bool ParamTraits<Geoposition::ErrorCode>::Read( - const Message* m, void** iter, Geoposition::ErrorCode* p) { - int error_code_param = 0; - bool ret = ReadParam(m, iter, &error_code_param); - *p = static_cast<Geoposition::ErrorCode>(error_code_param); - return ret; -} - -void ParamTraits<Geoposition::ErrorCode>::Log( - const Geoposition::ErrorCode& p, std::wstring* l) { - int error_code = p; - l->append(StringPrintf(L"<Geoposition::ErrorCode>%d", error_code)); -} - -void ParamTraits<Geoposition>::Write(Message* m, const Geoposition& p) { - WriteParam(m, p.latitude); - WriteParam(m, p.longitude); - WriteParam(m, p.accuracy); - WriteParam(m, p.altitude); - WriteParam(m, p.altitude_accuracy); - WriteParam(m, p.speed); - WriteParam(m, p.heading); - WriteParam(m, p.timestamp); - WriteParam(m, p.error_code); - WriteParam(m, p.error_message); -} - -bool ParamTraits<Geoposition>::Read( - const Message* m, void** iter, Geoposition* p) { - bool ret = ReadParam(m, iter, &p->latitude); - ret = ret && ReadParam(m, iter, &p->longitude); - ret = ret && ReadParam(m, iter, &p->accuracy); - ret = ret && ReadParam(m, iter, &p->altitude); - ret = ret && ReadParam(m, iter, &p->altitude_accuracy); - ret = ret && ReadParam(m, iter, &p->speed); - ret = ret && ReadParam(m, iter, &p->heading); - ret = ret && ReadParam(m, iter, &p->timestamp); - ret = ret && ReadParam(m, iter, &p->error_code); - ret = ret && ReadParam(m, iter, &p->error_message); - return ret; -} - -void ParamTraits<Geoposition>::Log(const Geoposition& p, std::wstring* l) { - l->append( - StringPrintf( - L"<Geoposition>" - L"%.6f %.6f %.6f %.6f " - L"%.6f %.6f %.6f " - L"%lld ", - p.latitude, p.longitude, p.accuracy, p.altitude, - p.altitude_accuracy, p.speed, p.heading, - p.timestamp)); - l->append(p.error_message); - LogParam<Geoposition::ErrorCode>(p.error_code, l); -} - } // namespace IPC + |