1 // Copyright (c) 2012 The Chromium Authors. 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 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
8 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
10 class GoogleLocationSettingsHelper
;
12 // Android-specific geolocation permission flow, taking into account the
13 // Google Location Settings, if available.
14 class ChromeGeolocationPermissionContextAndroid
15 : public ChromeGeolocationPermissionContext
{
17 explicit ChromeGeolocationPermissionContextAndroid(Profile
* profile
);
20 friend class ChromeGeolocationPermissionContext
;
22 virtual ~ChromeGeolocationPermissionContextAndroid();
24 // ChromeGeolocationPermissionContext implementation:
25 virtual void DecidePermission(const PermissionRequestID
& id
,
26 const GURL
& requesting_frame
,
28 base::Callback
<void(bool)> callback
) OVERRIDE
;
30 virtual void PermissionDecided(const PermissionRequestID
& id
,
31 const GURL
& requesting_frame
,
33 base::Callback
<void(bool)> callback
,
34 bool allowed
) OVERRIDE
;
36 scoped_ptr
<GoogleLocationSettingsHelper
> google_location_settings_helper_
;
38 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextAndroid
);
41 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_