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/renderer/geolocation_dispatcher.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/renderer/geolocation_dispatcher.h')
-rw-r--r-- | chrome/renderer/geolocation_dispatcher.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/chrome/renderer/geolocation_dispatcher.h b/chrome/renderer/geolocation_dispatcher.h deleted file mode 100644 index 31fdab4c..0000000 --- a/chrome/renderer/geolocation_dispatcher.h +++ /dev/null @@ -1,57 +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. - -#ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_ -#define CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_ - -#include "base/basictypes.h" -#include "base/id_map.h" -#include "chrome/common/geoposition.h" -#include "ipc/ipc_message.h" -#include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/GeolocationServiceBridgeChromium.h" - -class GURL; -class RenderView; - -// GeolocationDispatcher is a delegate for Geolocation messages used by -// WebKit. -// It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). -class GeolocationDispatcher : public WebKit::WebGeolocationServiceInterface { - public: - explicit GeolocationDispatcher(RenderView* render_view); - virtual ~GeolocationDispatcher(); - - // Called to possibly handle the incoming IPC message. Returns true if - // handled. Called in render thread. - bool OnMessageReceived(const IPC::Message& msg); - - // WebKit::GeolocationServiceInterfaceChromium. - void requestPermissionForFrame(int bridge_id, const WebKit::WebURL& url); - void startUpdating(int bridge_id, bool hasHighAccuracy); - void stopUpdating(int bridge_id); - void suspend(int bridge_id); - void resume(int bridge_id); - int attachBridge(WebKit::WebGeolocationServiceBridge* geolocation_service); - void dettachBridge(int bridge_id); - - private: - // Permission for using geolocation has been set. - void OnGeolocationPermissionSet(int bridge_id, bool is_allowed); - - // We have an updated geolocation position. - void OnGeolocationPositionUpdated(const Geoposition& geoposition); - - // An error has happened when fetching a geolocation position. - void OnGeolocationError(int code, const std::string& message); - - RenderView* render_view_; - - // The geolocation services attached to this dispatcher. - IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; - - DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcher); -}; - -#endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_ |