cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: [CB-2518] Enable Geolocation in InAppBrowser
Date Thu, 21 Feb 2013 14:07:29 GMT
Updated Branches:
  refs/heads/master fdb3679cf -> 5092b2931


[CB-2518] Enable Geolocation in InAppBrowser


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/5092b293
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/5092b293
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/5092b293

Branch: refs/heads/master
Commit: 5092b2931215f574811930062bec2eaf26f56c64
Parents: fdb3679
Author: Takeshi Sone <takeshi.sone@gmail.com>
Authored: Thu Feb 21 02:10:10 2013 +0900
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Feb 21 09:07:06 2013 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/InAppBrowser.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/5092b293/framework/src/org/apache/cordova/InAppBrowser.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/InAppBrowser.java b/framework/src/org/apache/cordova/InAppBrowser.java
index ffcc649..ad8ddaa 100644
--- a/framework/src/org/apache/cordova/InAppBrowser.java
+++ b/framework/src/org/apache/cordova/InAppBrowser.java
@@ -50,6 +50,7 @@ import android.view.WindowManager.LayoutParams;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.webkit.WebChromeClient;
+import android.webkit.GeolocationPermissions.Callback;
 import android.webkit.WebSettings;
 import android.webkit.WebStorage;
 import android.webkit.WebView;
@@ -524,6 +525,18 @@ public class InAppBrowser extends CordovaPlugin {
                 quotaUpdater.updateQuota(currentQuota);
             }
         }
+
+        /**
+         * Instructs the client to show a prompt to ask the user to set the Geolocation permission
state for the specified origin.
+         *
+         * @param origin
+         * @param callback
+         */
+        @Override
+        public void onGeolocationPermissionsShowPrompt(String origin, Callback callback)
{
+            super.onGeolocationPermissionsShowPrompt(origin, callback);
+            callback.invoke(origin, true, false);
+        }
     }
     
     /**


Mime
View raw message