diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 18:03:30 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 18:03:30 +0000 |
commit | e7c21b81e038b600c4a39a8c0f9e92ed6a6612c6 (patch) | |
tree | 6f0bcf6afa6862b279b1fc1d23d78cead2bd0de3 /content/renderer/geolocation_dispatcher.cc | |
parent | 903226b51dbba87492e2dac5405f82f5b3947f6d (diff) | |
download | chromium_src-e7c21b81e038b600c4a39a8c0f9e92ed6a6612c6.zip chromium_src-e7c21b81e038b600c4a39a8c0f9e92ed6a6612c6.tar.gz chromium_src-e7c21b81e038b600c4a39a8c0f9e92ed6a6612c6.tar.bz2 |
Move geolocation, desktop notification, and device orientation into their own message files.Also fix a regression from my earlier change to create a plugin through the embedder API. The fix is to not to create a plugin if the embedder returns NULL, and just have the default implementation create the plugin on its own.TBR=avi
R=brettw@chromium.org,johnnyg@chromium.org,darin@chromium.org,*,jam@chromium.org,ben@chromium.org
Review URL: http://codereview.chromium.org/6688054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/geolocation_dispatcher.cc')
-rw-r--r-- | content/renderer/geolocation_dispatcher.cc | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/content/renderer/geolocation_dispatcher.cc b/content/renderer/geolocation_dispatcher.cc index 0934aad..bcacbab 100644 --- a/content/renderer/geolocation_dispatcher.cc +++ b/content/renderer/geolocation_dispatcher.cc @@ -4,13 +4,14 @@ #include "content/renderer/geolocation_dispatcher.h" -#include "chrome/common/render_messages.h" +#include "content/common/geolocation_messages.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPosition.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationError.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" using namespace WebKit; @@ -26,10 +27,8 @@ GeolocationDispatcher::~GeolocationDispatcher() {} bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(GeolocationDispatcher, message) - IPC_MESSAGE_HANDLER(ViewMsg_Geolocation_PermissionSet, - OnGeolocationPermissionSet) - IPC_MESSAGE_HANDLER(ViewMsg_Geolocation_PositionUpdated, - OnGeolocationPositionUpdated) + IPC_MESSAGE_HANDLER(GeolocationMsg_PermissionSet, OnPermissionSet) + IPC_MESSAGE_HANDLER(GeolocationMsg_PositionUpdated, OnPositionUpdated) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -42,13 +41,13 @@ void GeolocationDispatcher::geolocationDestroyed() { void GeolocationDispatcher::startUpdating() { GURL url; - Send(new ViewHostMsg_Geolocation_StartUpdating( + Send(new GeolocationHostMsg_StartUpdating( routing_id(), url, enable_high_accuracy_)); updating_ = true; } void GeolocationDispatcher::stopUpdating() { - Send(new ViewHostMsg_Geolocation_StopUpdating(routing_id())); + Send(new GeolocationHostMsg_StopUpdating(routing_id())); updating_ = false; } @@ -83,7 +82,7 @@ void GeolocationDispatcher::requestPermission( const WebGeolocationPermissionRequest& permissionRequest) { int bridge_id = pending_permissions_->add(permissionRequest); string16 origin = permissionRequest.securityOrigin().toString(); - Send(new ViewHostMsg_Geolocation_RequestPermission( + Send(new GeolocationHostMsg_RequestPermission( routing_id(), bridge_id, GURL(origin))); } @@ -95,13 +94,12 @@ void GeolocationDispatcher::cancelPermissionRequest( if (!pending_permissions_->remove(permissionRequest, bridge_id)) return; string16 origin = permissionRequest.securityOrigin().toString(); - Send(new ViewHostMsg_Geolocation_CancelPermissionRequest( + Send(new GeolocationHostMsg_CancelPermissionRequest( routing_id(), bridge_id, GURL(origin))); } // Permission for using geolocation has been set. -void GeolocationDispatcher::OnGeolocationPermissionSet( - int bridge_id, bool is_allowed) { +void GeolocationDispatcher::OnPermissionSet(int bridge_id, bool is_allowed) { WebGeolocationPermissionRequest permissionRequest; if (!pending_permissions_->remove(bridge_id, permissionRequest)) return; @@ -109,8 +107,7 @@ void GeolocationDispatcher::OnGeolocationPermissionSet( } // We have an updated geolocation position or error code. -void GeolocationDispatcher::OnGeolocationPositionUpdated( - const Geoposition& geoposition) { +void GeolocationDispatcher::OnPositionUpdated(const Geoposition& geoposition) { // It is possible for the browser process to have queued an update message // before receiving the stop updating message. if (!updating_) |