Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / renderer / geolocation_dispatcher.cc
index a764b61..91bd540 100644 (file)
@@ -12,6 +12,7 @@
 #include "third_party/WebKit/public/web/WebGeolocationClient.h"
 #include "third_party/WebKit/public/web/WebGeolocationPosition.h"
 #include "third_party/WebKit/public/web/WebGeolocationError.h"
+#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
 
 using blink::WebGeolocationController;
 using blink::WebGeolocationError;
@@ -21,8 +22,8 @@ using blink::WebGeolocationPosition;
 
 namespace content {
 
-GeolocationDispatcher::GeolocationDispatcher(RenderViewImpl* render_view)
-    : RenderViewObserver(render_view),
+GeolocationDispatcher::GeolocationDispatcher(RenderFrame* render_frame)
+    : RenderFrameObserver(render_frame),
       pending_permissions_(new WebGeolocationPermissionRequestManager()),
       enable_high_accuracy_(false),
       updating_(false) {
@@ -40,11 +41,6 @@ bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) {
   return handled;
 }
 
-void GeolocationDispatcher::geolocationDestroyed() {
-  controller_.reset();
-  DCHECK(!updating_);
-}
-
 void GeolocationDispatcher::startUpdating() {
   GURL url;
   Send(new GeolocationHostMsg_StartUpdating(
@@ -89,7 +85,8 @@ void GeolocationDispatcher::requestPermission(
   int bridge_id = pending_permissions_->add(permissionRequest);
   base::string16 origin = permissionRequest.securityOrigin().toString();
   Send(new GeolocationHostMsg_RequestPermission(
-      routing_id(), bridge_id, GURL(origin)));
+      routing_id(), bridge_id, GURL(origin),
+      blink::WebUserGestureIndicator::isProcessingUserGesture()));
 }
 
 // TODO(jknotten): Change the messages to use a security origin, so no