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"
14 class GoogleLocationSettingsHelper
;
16 // Android-specific geolocation permission flow, taking into account the
17 // Google Location Settings, if available.
18 class ChromeGeolocationPermissionContextAndroid
19 : public ChromeGeolocationPermissionContext
{
21 explicit ChromeGeolocationPermissionContextAndroid(Profile
* profile
);
24 friend class ChromeGeolocationPermissionContext
;
26 virtual ~ChromeGeolocationPermissionContextAndroid();
28 // ChromeGeolocationPermissionContext implementation:
29 virtual void DecidePermission(content::WebContents
* web_contents
,
30 const PermissionRequestID
& id
,
31 const GURL
& requesting_frame
,
33 base::Callback
<void(bool)> callback
) OVERRIDE
;
35 virtual void PermissionDecided(const PermissionRequestID
& id
,
36 const GURL
& requesting_frame
,
38 base::Callback
<void(bool)> callback
,
39 bool allowed
) OVERRIDE
;
41 scoped_ptr
<GoogleLocationSettingsHelper
> google_location_settings_helper_
;
43 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextAndroid
);
46 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_