Chromium Code Reviews| 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 6af10e61ff6c1d4c765d79c3b38c8c838c4f3bf3..445e9c9b879ffde7af9ce8be85e600b906ae0fe2 100644 |
| --- a/chrome/browser/geolocation/geolocation_permission_context_android.h |
| +++ b/chrome/browser/geolocation/geolocation_permission_context_android.h |
| @@ -25,6 +25,8 @@ |
| // per site settings) are queried on the UI thread while the system level |
| // permissions are considered I/O and thus checked in the blocking thread pool. |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "chrome/browser/content_settings/permission_request_id.h" |
| #include "chrome/browser/geolocation/geolocation_permission_context.h" |
| #include "url/gurl.h" |
| @@ -35,44 +37,46 @@ class WebContents; |
| class GoogleLocationSettingsHelper; |
| - |
| class GeolocationPermissionContextAndroid |
| : public GeolocationPermissionContext { |
| public: |
| explicit GeolocationPermissionContextAndroid(Profile* profile); |
| + virtual ~GeolocationPermissionContextAndroid(); |
| private: |
| struct PermissionRequestInfo { |
|
Michael van Ouwerkerk
2014/08/13 10:01:10
This struct looks generic. Can it be used for othe
Miguel Garcia
2014/08/13 13:18:13
This is only used to pass information during the t
|
| PermissionRequestInfo(); |
| PermissionRequestID id; |
| - GURL requesting_frame; |
| + GURL requesting_origin; |
| + GURL embedder_origin; |
| bool user_gesture; |
| - GURL embedder; |
| }; |
| - friend class GeolocationPermissionContext; |
| - |
| - virtual ~GeolocationPermissionContextAndroid(); |
| + // PermissionContextBase: |
| + virtual void RequestPermission( |
| + content::WebContents* web_contents, |
| + const PermissionRequestID& id, |
| + const GURL& requesting_frame_origin, |
| + bool user_gesture, |
| + const BrowserPermissionCallback& callback) OVERRIDE; |
| - // GeolocationPermissionContext implementation: |
| - virtual void DecidePermission(content::WebContents* web_contents, |
| - const PermissionRequestID& id, |
| - const GURL& requesting_frame, |
| - bool user_gesture, |
| - const GURL& embedder, |
| - base::Callback<void(bool)> callback) OVERRIDE; |
| + void CheckMasterLocation(content::WebContents* web_contents, |
| + const PermissionRequestInfo& info, |
| + const BrowserPermissionCallback& callback); |
| void ProceedDecidePermission(content::WebContents* web_contents, |
| const PermissionRequestInfo& info, |
| base::Callback<void(bool)> callback); |
| + // Will perform a final check on the system location settigns before |
|
Michael van Ouwerkerk
2014/08/13 10:01:10
s/settigns/settings/
Miguel Garcia
2014/08/13 13:18:13
Done.
|
| + // granting the permission. |
| + void InterceptPermissionCheck(const BrowserPermissionCallback& callback, |
| + bool granted); |
| + |
| scoped_ptr<GoogleLocationSettingsHelper> google_location_settings_helper_; |
| + base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; |
| - private: |
| - void CheckSystemLocation(content::WebContents* web_contents, |
| - const PermissionRequestInfo& info, |
| - base::Callback<void(bool)> callback); |
| DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); |
| }; |