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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 955383003: ContentBrowserClient::RequestPermission replies with PermissionStatus instead of bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android geolocation breakage Created 5 years, 10 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: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index a73fc9eb20adc67794db671b11429e9357357bdf..927fdd7cc73d1aa61427ca4b1ede9e9f71290980 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -287,6 +287,25 @@ ShellContentBrowserClient::CreateQuotaPermissionContext() {
return new ShellQuotaPermissionContext();
}
+void ShellContentBrowserClient::RequestPermission(
+ PermissionType permission,
+ WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ const base::Callback<void(PermissionStatus)>& callback) {
+ // Some Geolocation tests on Android are still expecting to have the
+ // permission granted. See https://crbug.com/463514.
+ if (permission == PERMISSION_GEOLOCATION) {
+ callback.Run(PERMISSION_STATUS_GRANTED);
+ return;
+ }
+
+ ContentBrowserClient::RequestPermission(
+ permission, web_contents, bridge_id,
+ requesting_frame, user_gesture, callback);
+}
+
SpeechRecognitionManagerDelegate*
ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
return new ShellSpeechRecognitionManagerDelegate();

Powered by Google App Engine
This is Rietveld 408576698