Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1985)

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 330143002: Simplify geolocation permission request in the Content API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix layout test Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 7c3dc6590991f180d19518ec90060fffd9ba3880..d5e8390de86601050375bb4aea37a91316795baf 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -386,6 +386,24 @@ void AwContentBrowserClient::ShowDesktopNotification(
NOTREACHED() << "Android WebView does not support desktop notifications.";
}
+void AwContentBrowserClient::RequestGeolocationPermission(
+ content::WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ AwContentsClientBridgeBase* client =
+ AwContentsClientBridgeBase::FromWebContents(web_contents);
+ if (client) {
+ client->RequestGeolocationPermission(
+ web_contents, requesting_frame, result_callback, cancel_callback);
+ } else {
+ LOG(WARNING) << "Failed to find the associated bridge for geolocation "
+ << "permission request.";
mkosiba (inactive) 2014/06/13 08:17:03 do we need to result_callback.Run(false); in this
jam 2014/06/13 14:56:08 Done.
+ }
+}
+
bool AwContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
« no previous file with comments | « android_webview/browser/aw_content_browser_client.h ('k') | android_webview/browser/aw_contents_client_bridge_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698