1 // Copyright 2013 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "public/ewk_geolocation_internal.h"
7 #include "public/ewk_security_origin.h"
8 #include "private/ewk_security_origin_private.h"
9 #include "private/ewk_geolocation_private.h"
11 const Ewk_Security_Origin* ewk_geolocation_permission_request_origin_get(const Ewk_Geolocation_Permission_Request* permissionRequest)
13 EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, 0);
14 return static_cast<const Ewk_Security_Origin*>(permissionRequest->GetOrigin());
17 Eina_Bool ewk_geolocation_permission_request_set(Ewk_Geolocation_Permission_Request* permissionRequest, Eina_Bool allow)
19 EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, EINA_FALSE);
20 return permissionRequest->setDecision(allow == EINA_TRUE);
23 Eina_Bool ewk_geolocation_permission_reply(Ewk_Geolocation_Permission_Request* permissionRequest, Eina_Bool allow)
25 EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, EINA_FALSE);
26 return permissionRequest->setDecision(allow == EINA_TRUE); // the same as ewk_geolocation_permission_request_set
29 void ewk_geolocation_permission_request_suspend(Ewk_Geolocation_Permission_Request* permissionRequest)
31 EINA_SAFETY_ON_NULL_RETURN(permissionRequest);
32 permissionRequest->suspend();