diff options
author | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 13:58:48 +0000 |
---|---|---|
committer | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 13:58:48 +0000 |
commit | ecad7768a4f40e1ff1a6f1634d18a68358978cdb (patch) | |
tree | 78f530436257f410d8fa153c40cae5b35714ff0f | |
parent | 70372d49ac0fc1bbfd7e04aa820b646a6c525743 (diff) | |
download | chromium_src-ecad7768a4f40e1ff1a6f1634d18a68358978cdb.zip chromium_src-ecad7768a4f40e1ff1a6f1634d18a68358978cdb.tar.gz chromium_src-ecad7768a4f40e1ff1a6f1634d18a68358978cdb.tar.bz2 |
Geolocation dispatcher rename:
Rename GeolocationDispatcherHost to GeolocationDispatcherHostOld and GeolocationDispatcher to GeolocationDispatcherOld in preparation for the new client-based implementation.
BUG=59908
TEST=None
Review URL: http://codereview.chromium.org/3799010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63507 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/geolocation/geolocation_dispatcher_host_old.cc (renamed from chrome/browser/geolocation/geolocation_dispatcher_host.cc) | 65 | ||||
-rw-r--r-- | chrome/browser/geolocation/geolocation_dispatcher_host_old.h (renamed from chrome/browser/geolocation/geolocation_dispatcher_host.h) | 25 | ||||
-rw-r--r-- | chrome/browser/geolocation/geolocation_permission_context.cc | 2 | ||||
-rw-r--r-- | chrome/browser/geolocation/geolocation_permission_context.h | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.cc | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.h | 4 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 4 | ||||
-rw-r--r-- | chrome/chrome_renderer.gypi | 4 | ||||
-rw-r--r-- | chrome/renderer/geolocation_dispatcher_old.cc (renamed from chrome/renderer/geolocation_dispatcher.cc) | 30 | ||||
-rw-r--r-- | chrome/renderer/geolocation_dispatcher_old.h (renamed from chrome/renderer/geolocation_dispatcher.h) | 22 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 4 |
12 files changed, 89 insertions, 80 deletions
diff --git a/chrome/browser/geolocation/geolocation_dispatcher_host.cc b/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc index 5e8209c..0af76e0 100644 --- a/chrome/browser/geolocation/geolocation_dispatcher_host.cc +++ b/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/geolocation/geolocation_dispatcher_host.h" +#include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" #include <map> #include <set> @@ -19,14 +19,14 @@ #include "ipc/ipc_message.h" namespace { -class GeolocationDispatcherHostImpl : public GeolocationDispatcherHost, - public GeolocationObserver { +class GeolocationDispatcherHostOldImpl : public GeolocationDispatcherHostOld, + public GeolocationObserver { public: - GeolocationDispatcherHostImpl( + GeolocationDispatcherHostOldImpl( int resource_message_filter_process_id, GeolocationPermissionContext* geolocation_permission_context); - // GeolocationDispatcherHost + // GeolocationDispatcherHostOld // Called to possibly handle the incoming IPC message. Returns true if // handled. Called in the browser process. virtual bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok); @@ -35,8 +35,8 @@ class GeolocationDispatcherHostImpl : public GeolocationDispatcherHost, virtual void OnLocationUpdate(const Geoposition& position); private: - friend class base::RefCountedThreadSafe<GeolocationDispatcherHostImpl>; - virtual ~GeolocationDispatcherHostImpl(); + friend class base::RefCountedThreadSafe<GeolocationDispatcherHostOldImpl>; + virtual ~GeolocationDispatcherHostOldImpl(); void OnRegisterDispatcher(int render_view_id); void OnUnregisterDispatcher(int render_view_id); @@ -70,10 +70,10 @@ class GeolocationDispatcherHostImpl : public GeolocationDispatcherHost, // Only set whilst we are registered with the arbitrator. GeolocationProvider* location_provider_; - DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHostImpl); + DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHostOldImpl); }; -GeolocationDispatcherHostImpl::GeolocationDispatcherHostImpl( +GeolocationDispatcherHostOldImpl::GeolocationDispatcherHostOldImpl( int resource_message_filter_process_id, GeolocationPermissionContext* geolocation_permission_context) : resource_message_filter_process_id_(resource_message_filter_process_id), @@ -84,17 +84,17 @@ GeolocationDispatcherHostImpl::GeolocationDispatcherHostImpl( // a javascript geolocation object is actually initialized. } -GeolocationDispatcherHostImpl::~GeolocationDispatcherHostImpl() { +GeolocationDispatcherHostOldImpl::~GeolocationDispatcherHostOldImpl() { if (location_provider_) location_provider_->RemoveObserver(this); } -bool GeolocationDispatcherHostImpl::OnMessageReceived( +bool GeolocationDispatcherHostOldImpl::OnMessageReceived( const IPC::Message& msg, bool* msg_was_ok) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); *msg_was_ok = true; bool handled = true; - IPC_BEGIN_MESSAGE_MAP_EX(GeolocationDispatcherHostImpl, msg, *msg_was_ok) + IPC_BEGIN_MESSAGE_MAP_EX(GeolocationDispatcherHostOldImpl, msg, *msg_was_ok) IPC_MESSAGE_HANDLER(ViewHostMsg_Geolocation_RegisterDispatcher, OnRegisterDispatcher) IPC_MESSAGE_HANDLER(ViewHostMsg_Geolocation_UnregisterDispatcher, @@ -116,7 +116,7 @@ bool GeolocationDispatcherHostImpl::OnMessageReceived( return handled; } -void GeolocationDispatcherHostImpl::OnLocationUpdate( +void GeolocationDispatcherHostOldImpl::OnLocationUpdate( const Geoposition& geoposition) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); for (std::set<int>::iterator it = geolocation_renderer_ids_.begin(); @@ -128,19 +128,21 @@ void GeolocationDispatcherHostImpl::OnLocationUpdate( } } -void GeolocationDispatcherHostImpl::OnRegisterDispatcher(int render_view_id) { +void GeolocationDispatcherHostOldImpl::OnRegisterDispatcher( + int render_view_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK_EQ(0u, geolocation_renderer_ids_.count(render_view_id)); geolocation_renderer_ids_.insert(render_view_id); } -void GeolocationDispatcherHostImpl::OnUnregisterDispatcher(int render_view_id) { +void GeolocationDispatcherHostOldImpl::OnUnregisterDispatcher( + int render_view_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK_EQ(1u, geolocation_renderer_ids_.count(render_view_id)); geolocation_renderer_ids_.erase(render_view_id); } -void GeolocationDispatcherHostImpl::OnRequestPermission( +void GeolocationDispatcherHostOldImpl::OnRequestPermission( int render_view_id, int bridge_id, const GURL& requesting_frame) { @@ -152,7 +154,7 @@ void GeolocationDispatcherHostImpl::OnRequestPermission( requesting_frame); } -void GeolocationDispatcherHostImpl::OnCancelPermissionRequest( +void GeolocationDispatcherHostOldImpl::OnCancelPermissionRequest( int render_view_id, int bridge_id, const GURL& requesting_frame) { @@ -164,7 +166,7 @@ void GeolocationDispatcherHostImpl::OnCancelPermissionRequest( requesting_frame); } -void GeolocationDispatcherHostImpl::OnStartUpdating( +void GeolocationDispatcherHostOldImpl::OnStartUpdating( int render_view_id, int bridge_id, const GURL& requesting_frame, @@ -183,8 +185,8 @@ void GeolocationDispatcherHostImpl::OnStartUpdating( RefreshGeolocationObserverOptions(); } -void GeolocationDispatcherHostImpl::OnStopUpdating(int render_view_id, - int bridge_id) { +void GeolocationDispatcherHostOldImpl::OnStopUpdating(int render_view_id, + int bridge_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":" << render_view_id << ":" << bridge_id; @@ -194,23 +196,23 @@ void GeolocationDispatcherHostImpl::OnStopUpdating(int render_view_id, resource_message_filter_process_id_, render_view_id, bridge_id); } -void GeolocationDispatcherHostImpl::OnSuspend(int render_view_id, - int bridge_id) { +void GeolocationDispatcherHostOldImpl::OnSuspend(int render_view_id, + int bridge_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":" << render_view_id << ":" << bridge_id; // TODO(bulach): connect this with GeolocationArbitrator. } -void GeolocationDispatcherHostImpl::OnResume(int render_view_id, - int bridge_id) { +void GeolocationDispatcherHostOldImpl::OnResume(int render_view_id, + int bridge_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":" << render_view_id << ":" << bridge_id; // TODO(bulach): connect this with GeolocationArbitrator. } -void GeolocationDispatcherHostImpl::RefreshGeolocationObserverOptions() { +void GeolocationDispatcherHostOldImpl::RefreshGeolocationObserverOptions() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (bridge_update_options_.empty()) { if (location_provider_) { @@ -221,16 +223,17 @@ void GeolocationDispatcherHostImpl::RefreshGeolocationObserverOptions() { if (!location_provider_) location_provider_ = GeolocationProvider::GetInstance(); // Re-add to re-establish our options, in case they changed. - location_provider_->AddObserver(this, - GeolocationObserverOptions::Collapse( - bridge_update_options_)); + location_provider_->AddObserver( + this, + GeolocationObserverOptions::Collapse(bridge_update_options_)); } } } // namespace -GeolocationDispatcherHost* GeolocationDispatcherHost::New( +GeolocationDispatcherHostOld* GeolocationDispatcherHostOld::New( int resource_message_filter_process_id, GeolocationPermissionContext* geolocation_permission_context) { - return new GeolocationDispatcherHostImpl(resource_message_filter_process_id, - geolocation_permission_context); + return new GeolocationDispatcherHostOldImpl( + resource_message_filter_process_id, + geolocation_permission_context); } diff --git a/chrome/browser/geolocation/geolocation_dispatcher_host.h b/chrome/browser/geolocation/geolocation_dispatcher_host_old.h index 38b79ef..655049a 100644 --- a/chrome/browser/geolocation/geolocation_dispatcher_host.h +++ b/chrome/browser/geolocation/geolocation_dispatcher_host_old.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ -#define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ +#ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_OLD_H_ +#define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_OLD_H_ #pragma once #include "base/ref_counted.h" @@ -11,13 +11,16 @@ class GeolocationPermissionContext; namespace IPC { class Message; } -// GeolocationDispatcherHost is a delegate for Geolocation messages used by +// GeolocationDispatcherHostOld is a delegate for Geolocation messages used by // ResourceMessageFilter. // It's the complement of GeolocationDispatcher (owned by RenderView). -class GeolocationDispatcherHost - : public base::RefCountedThreadSafe<GeolocationDispatcherHost> { + +// TODO(jknotten): Remove this class once the new client-based implementation is +// checked in (see http://crbug.com/59908). +class GeolocationDispatcherHostOld + : public base::RefCountedThreadSafe<GeolocationDispatcherHostOld> { public: - static GeolocationDispatcherHost* New( + static GeolocationDispatcherHostOld* New( int resource_message_filter_process_id, GeolocationPermissionContext* geolocation_permission_context); @@ -26,11 +29,11 @@ class GeolocationDispatcherHost virtual bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok) = 0; protected: - friend class base::RefCountedThreadSafe<GeolocationDispatcherHost>; - GeolocationDispatcherHost() {} - virtual ~GeolocationDispatcherHost() {} + friend class base::RefCountedThreadSafe<GeolocationDispatcherHostOld>; + GeolocationDispatcherHostOld() {} + virtual ~GeolocationDispatcherHostOld() {} - DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost); + DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHostOld); }; -#endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ +#endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_OLD_H_ diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc index 8a71b47..7fb9aae 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.cc +++ b/chrome/browser/geolocation/geolocation_permission_context.cc @@ -11,7 +11,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/geolocation/geolocation_content_settings_map.h" -#include "chrome/browser/geolocation/geolocation_dispatcher_host.h" +#include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" #include "chrome/browser/geolocation/geolocation_provider.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context.h b/chrome/browser/geolocation/geolocation_permission_context.h index 2fc7da1..432c9a2 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.h +++ b/chrome/browser/geolocation/geolocation_permission_context.h @@ -10,7 +10,6 @@ #include "base/ref_counted.h" #include "base/scoped_ptr.h" -class GeolocationDispatcherHost; class GeolocationInfoBarQueueController; class GeolocationPermissionContext; class GURL; diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index cea0c94..8e1d7d9 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -32,7 +32,7 @@ #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/file_system/file_system_dispatcher_host.h" #include "chrome/browser/file_system/file_system_host_context.h" -#include "chrome/browser/geolocation/geolocation_dispatcher_host.h" +#include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" #include "chrome/browser/geolocation/geolocation_permission_context.h" #include "chrome/browser/gpu_process_host.h" #include "chrome/browser/host_zoom_map.h" @@ -239,7 +239,7 @@ ResourceMessageFilter::ResourceMessageFilter( ALLOW_THIS_IN_INITIALIZER_LIST(speech_input_dispatcher_host_( new speech_input::SpeechInputDispatcherHost(this->id()))), ALLOW_THIS_IN_INITIALIZER_LIST(geolocation_dispatcher_host_( - GeolocationDispatcherHost::New( + GeolocationDispatcherHostOld::New( this->id(), profile->GetGeolocationPermissionContext()))), ALLOW_THIS_IN_INITIALIZER_LIST( search_provider_install_state_dispatcher_host_( diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 97d3992..fa1932e 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -39,7 +39,7 @@ class DOMStorageDispatcherHost; class FileSystemDispatcherHost; class FileUtilitiesDispatcherHost; struct FontDescriptor; -class GeolocationDispatcherHost; +class GeolocationDispatcherHostOld; class HostZoomMap; class IndexedDBDispatcherHost; class NotificationsPrefsCache; @@ -479,7 +479,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, speech_input_dispatcher_host_; // Used to handle geolocation-related messages. - scoped_refptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; + scoped_refptr<GeolocationDispatcherHostOld> geolocation_dispatcher_host_; // Used to handle search provider related messages. scoped_ptr<SearchProviderInstallStateDispatcherHost> diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 7809a68..20e50d6 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1662,8 +1662,8 @@ 'browser/geolocation/gateway_data_provider_win.h', 'browser/geolocation/geolocation_content_settings_map.cc', 'browser/geolocation/geolocation_content_settings_map.h', - 'browser/geolocation/geolocation_dispatcher_host.cc', - 'browser/geolocation/geolocation_dispatcher_host.h', + 'browser/geolocation/geolocation_dispatcher_host_old.cc', + 'browser/geolocation/geolocation_dispatcher_host_old.h', 'browser/geolocation/geolocation_exceptions_table_model.cc', 'browser/geolocation/geolocation_exceptions_table_model.h', 'browser/geolocation/geolocation_observer.h', diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index d055052..af9c6fd 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -111,8 +111,8 @@ 'renderer/external_extension.h', 'renderer/form_manager.cc', 'renderer/form_manager.h', - 'renderer/geolocation_dispatcher.cc', - 'renderer/geolocation_dispatcher.h', + 'renderer/geolocation_dispatcher_old.cc', + 'renderer/geolocation_dispatcher_old.h', 'renderer/gpu_channel_host.cc', 'renderer/gpu_channel_host.h', 'renderer/gpu_video_decoder_host.cc', diff --git a/chrome/renderer/geolocation_dispatcher.cc b/chrome/renderer/geolocation_dispatcher_old.cc index 087796b..a6eff8b 100644 --- a/chrome/renderer/geolocation_dispatcher.cc +++ b/chrome/renderer/geolocation_dispatcher_old.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/renderer/geolocation_dispatcher.h" +#include "chrome/renderer/geolocation_dispatcher_old.h" #include "base/command_line.h" #include "chrome/common/chrome_switches.h" @@ -13,13 +13,13 @@ using WebKit::WebFrame; -GeolocationDispatcher::GeolocationDispatcher(RenderView* render_view) +GeolocationDispatcherOld::GeolocationDispatcherOld(RenderView* render_view) : render_view_(render_view) { render_view_->Send(new ViewHostMsg_Geolocation_RegisterDispatcher( render_view_->routing_id())); } -GeolocationDispatcher::~GeolocationDispatcher() { +GeolocationDispatcherOld::~GeolocationDispatcherOld() { for (IDMap<WebKit::WebGeolocationServiceBridge>::iterator it(&bridges_map_); !it.IsAtEnd(); it.Advance()) { it.GetCurrentValue()->onWebGeolocationServiceDestroyed(); @@ -28,9 +28,9 @@ GeolocationDispatcher::~GeolocationDispatcher() { render_view_->routing_id())); } -bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) { +bool GeolocationDispatcherOld::OnMessageReceived(const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(GeolocationDispatcher, message) + IPC_BEGIN_MESSAGE_MAP(GeolocationDispatcherOld, message) IPC_MESSAGE_HANDLER(ViewMsg_Geolocation_PermissionSet, OnGeolocationPermissionSet) IPC_MESSAGE_HANDLER(ViewMsg_Geolocation_PositionUpdated, @@ -40,50 +40,50 @@ bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) { return handled; } -void GeolocationDispatcher::requestPermissionForFrame( +void GeolocationDispatcherOld::requestPermissionForFrame( int bridge_id, const WebKit::WebURL& url) { render_view_->Send(new ViewHostMsg_Geolocation_RequestPermission( render_view_->routing_id(), bridge_id, GURL(url))); } -void GeolocationDispatcher::cancelPermissionRequestForFrame( +void GeolocationDispatcherOld::cancelPermissionRequestForFrame( int bridge_id, const WebKit::WebURL& url) { render_view_->Send(new ViewHostMsg_Geolocation_CancelPermissionRequest( render_view_->routing_id(), bridge_id, GURL(url))); } -void GeolocationDispatcher::startUpdating( +void GeolocationDispatcherOld::startUpdating( int bridge_id, const WebKit::WebURL& url, bool enableHighAccuracy) { render_view_->Send(new ViewHostMsg_Geolocation_StartUpdating( render_view_->routing_id(), bridge_id, GURL(url), enableHighAccuracy)); } -void GeolocationDispatcher::stopUpdating(int bridge_id) { +void GeolocationDispatcherOld::stopUpdating(int bridge_id) { render_view_->Send(new ViewHostMsg_Geolocation_StopUpdating( render_view_->routing_id(), bridge_id)); } -void GeolocationDispatcher::suspend(int bridge_id) { +void GeolocationDispatcherOld::suspend(int bridge_id) { render_view_->Send(new ViewHostMsg_Geolocation_Suspend( render_view_->routing_id(), bridge_id)); } -void GeolocationDispatcher::resume(int bridge_id) { +void GeolocationDispatcherOld::resume(int bridge_id) { render_view_->Send(new ViewHostMsg_Geolocation_Resume( render_view_->routing_id(), bridge_id)); } -int GeolocationDispatcher::attachBridge( +int GeolocationDispatcherOld::attachBridge( WebKit::WebGeolocationServiceBridge* bridge) { return bridges_map_.Add(bridge); } -void GeolocationDispatcher::detachBridge(int bridge_id) { +void GeolocationDispatcherOld::detachBridge(int bridge_id) { bridges_map_.Remove(bridge_id); } -void GeolocationDispatcher::OnGeolocationPermissionSet(int bridge_id, +void GeolocationDispatcherOld::OnGeolocationPermissionSet(int bridge_id, bool allowed) { WebKit::WebGeolocationServiceBridge* bridge = bridges_map_.Lookup(bridge_id); if (bridge) { @@ -91,7 +91,7 @@ void GeolocationDispatcher::OnGeolocationPermissionSet(int bridge_id, } } -void GeolocationDispatcher::OnGeolocationPositionUpdated( +void GeolocationDispatcherOld::OnGeolocationPositionUpdated( const Geoposition& geoposition) { DCHECK(geoposition.IsInitialized()); for (IDMap<WebKit::WebGeolocationServiceBridge>::iterator it(&bridges_map_); diff --git a/chrome/renderer/geolocation_dispatcher.h b/chrome/renderer/geolocation_dispatcher_old.h index e6fea72..41473f3 100644 --- a/chrome/renderer/geolocation_dispatcher.h +++ b/chrome/renderer/geolocation_dispatcher_old.h @@ -2,8 +2,8 @@ // 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_ +#ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ +#define CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ #pragma once #include "base/basictypes.h" @@ -16,13 +16,17 @@ class GURL; class RenderView; struct Geoposition; -// GeolocationDispatcher is a delegate for Geolocation messages used by +// GeolocationDispatcherOld is a delegate for Geolocation messages used by // WebKit. -// It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). -class GeolocationDispatcher : public WebKit::WebGeolocationService { +// It's the complement of GeolocationDispatcherHostOld (owned by +// RenderViewHost). + +// TODO(jknotten): Remove this class once the new client-based implementation is +// checked in (see http://crbug.com/59908). +class GeolocationDispatcherOld : public WebKit::WebGeolocationService { public: - explicit GeolocationDispatcher(RenderView* render_view); - virtual ~GeolocationDispatcher(); + explicit GeolocationDispatcherOld(RenderView* render_view); + virtual ~GeolocationDispatcherOld(); // Called to possibly handle the incoming IPC message. Returns true if // handled. Called in render thread. @@ -52,7 +56,7 @@ class GeolocationDispatcher : public WebKit::WebGeolocationService { // The geolocation services attached to this dispatcher. IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; - DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcher); + DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherOld); }; -#endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_ +#endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 8c2a984..586471e 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -60,7 +60,7 @@ #include "chrome/renderer/extensions/extension_renderer_info.h" #include "chrome/renderer/extensions/renderer_extension_bindings.h" #include "chrome/renderer/external_host_bindings.h" -#include "chrome/renderer/geolocation_dispatcher.h" +#include "chrome/renderer/geolocation_dispatcher_old.h" #include "chrome/renderer/ggl/ggl.h" #include "chrome/renderer/localized_error.h" #include "chrome/renderer/media/audio_renderer_impl.h" @@ -5940,7 +5940,7 @@ void RenderView::OnPageTranslated() { WebKit::WebGeolocationService* RenderView::geolocationService() { if (!geolocation_dispatcher_.get()) - geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); + geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this)); return geolocation_dispatcher_.get(); } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 57c26ff..cd28c02 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -60,7 +60,7 @@ class DomAutomationController; class DOMUIBindings; class ExternalHostBindings; class FilePath; -class GeolocationDispatcher; +class GeolocationDispatcherOld; class GURL; class ListValue; class NavigationState; @@ -1299,7 +1299,7 @@ class RenderView : public RenderWidget, scoped_refptr<AudioMessageFilter> audio_message_filter_; // The geolocation dispatcher attached to this view, lazily initialized. - scoped_ptr<GeolocationDispatcher> geolocation_dispatcher_; + scoped_ptr<GeolocationDispatcherOld> geolocation_dispatcher_; // Handles accessibility requests into the renderer side, as well as // maintains the cache and other features of the accessibility tree. |