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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_android.h

Issue 2725253002: Rebase and some more stuff
Patch Set: Created 3 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: chrome/browser/geolocation/geolocation_permission_context_android.h
diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.h b/chrome/browser/geolocation/geolocation_permission_context_android.h
index a739df65e7e2b0e3cd878b3686451b9142f860b5..96273618a7ca7fd51495e74a96b962846d0f6278 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_android.h
+++ b/chrome/browser/geolocation/geolocation_permission_context_android.h
@@ -24,7 +24,10 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/android/location_settings.h"
#include "chrome/browser/geolocation/geolocation_permission_context.h"
+#include "components/location/android/location_settings_dialog_context.h"
+#include "components/location/android/location_settings_dialog_outcome.h"
namespace content {
class WebContents;
@@ -34,7 +37,6 @@ namespace infobars {
class InfoBar;
}
-class LocationSettings;
class GURL;
class PermissionRequestID;
@@ -69,12 +71,42 @@ class GeolocationPermissionContextAndroid
bool persist,
ContentSetting content_setting) override;
+ bool IsLocationAccessPossible(content::WebContents* web_contents,
+ const GURL& requesting_origin,
+ bool user_gesture);
+
+ LocationSettingsDialogContext
+ GetLocationSettingsDialogContext(const GURL& requesting_origin);
+
void HandleUpdateAndroidPermissions(const PermissionRequestID& id,
const GURL& requesting_frame_origin,
const GURL& embedding_origin,
const BrowserPermissionCallback& callback,
bool permissions_updated);
+ // Will return true if the location settings dialog will be shown for the
+ // given origins. This is true if the location setting is off, the dialog can
+ // be shown, any gesture requirements for the origin are met, and the dialog
+ // is not being suppressed for backoff.
+ bool CanShowLocationSettingsDialog(const GURL& requesting_origin,
+ bool user_gesture);
+
+ void OnLocationSettingsDialogShown(
+ const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const BrowserPermissionCallback& callback,
+ bool persist,
+ ContentSetting content_setting,
+ LocationSettingsDialogOutcome prompt_outcome);
+
+ void FinishNotifyPermissionSet(const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const BrowserPermissionCallback& callback,
+ bool persist,
+ ContentSetting content_setting);
+
// Overrides the LocationSettings object used to determine whether
// system and Chrome-wide location permissions are enabled.
void SetLocationSettingsForTesting(
« no previous file with comments | « chrome/browser/android/mock_location_settings.cc ('k') | chrome/browser/geolocation/geolocation_permission_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698