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. 4 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 7 8 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 9 10 class GoogleLocationSettingsHelper; 11 12 // Android-specific geolocation permission flow, taking into account the 13 // Google Location Settings, if available. 14 class ChromeGeolocationPermissionContextAndroid 15 : public ChromeGeolocationPermissionContext { 16 public: 17 explicit ChromeGeolocationPermissionContextAndroid(Profile* profile); 18 19 private: 20 friend class ChromeGeolocationPermissionContext; 21 22 virtual ~ChromeGeolocationPermissionContextAndroid(); 23 24 // ChromeGeolocationPermissionContext implementation: 25 virtual void DecidePermission(const PermissionRequestID& id, 26 const GURL& requesting_frame, 27 const GURL& embedder, 28 base::Callback<void(bool)> callback) OVERRIDE; 29 30 virtual void PermissionDecided(const PermissionRequestID& id, 31 const GURL& requesting_frame, 32 const GURL& embedder, 33 base::Callback<void(bool)> callback, 34 bool allowed) OVERRIDE; 35 36 scoped_ptr<GoogleLocationSettingsHelper> google_location_settings_helper_; 37 38 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextAndroid); 39 }; 40 41 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 42