| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID
_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID
_H_ |
| 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID
_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDROID
_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 8 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
| 9 | 9 |
| 10 class GoogleLocationSettingsHelper; |
| 10 | 11 |
| 11 // Android-specific geolocation permission flow, taking into account the | 12 // Android-specific geolocation permission flow, taking into account the |
| 12 // Google Location Settings, if available. | 13 // Google Location Settings, if available. |
| 13 class ChromeGeolocationPermissionContextAndroid | 14 class ChromeGeolocationPermissionContextAndroid |
| 14 : public ChromeGeolocationPermissionContext { | 15 : public ChromeGeolocationPermissionContext { |
| 15 public: | 16 public: |
| 16 explicit ChromeGeolocationPermissionContextAndroid(Profile* profile); | 17 explicit ChromeGeolocationPermissionContextAndroid(Profile* profile); |
| 17 | 18 |
| 18 private: | 19 private: |
| 19 friend class ChromeGeolocationPermissionContext; | 20 friend class ChromeGeolocationPermissionContext; |
| 20 | 21 |
| 21 // ChromeGeolocationPermissionContext implementation: | 22 // ChromeGeolocationPermissionContext implementation: |
| 22 virtual void DecidePermission( | 23 virtual void DecidePermission( |
| 23 int render_process_id, | 24 int render_process_id, |
| 24 int render_view_id, | 25 int render_view_id, |
| 25 int bridge_id, | 26 int bridge_id, |
| 26 const GURL& requesting_frame, | 27 const GURL& requesting_frame, |
| 27 const GURL& embedder, | 28 const GURL& embedder, |
| 28 base::Callback<void(bool)> callback) OVERRIDE; | 29 base::Callback<void(bool)> callback) OVERRIDE; |
| 29 | 30 |
| 31 virtual void PermissionDecided(int render_process_id, |
| 32 int render_view_id, |
| 33 int bridge_id, |
| 34 const GURL& requesting_frame, |
| 35 const GURL& embedder, |
| 36 base::Callback<void(bool)> callback, |
| 37 bool allowed) OVERRIDE; |
| 38 |
| 39 scoped_ptr<GoogleLocationSettingsHelper> google_location_settings_helper_; |
| 40 |
| 30 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextAndroid); | 41 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextAndroid); |
| 31 }; | 42 }; |
| 32 | 43 |
| 33 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDR
OID_H_ | 44 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_ANDR
OID_H_ |
| OLD | NEW |