OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ |
6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ |
7 | 7 |
8 // The flow for geolocation permissions on Android needs to take into account | 8 // The flow for geolocation permissions on Android needs to take into account |
9 // the global geolocation settings so it differs from the desktop one. It | 9 // the global geolocation settings so it differs from the desktop one. It |
10 // works as follows. | 10 // works as follows. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 kCount, | 55 kCount, |
56 }; | 56 }; |
57 | 57 |
58 static void RegisterProfilePrefs(PrefRegistrySimple* registry); | 58 static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
59 | 59 |
60 explicit GeolocationPermissionContextAndroid(Profile* profile); | 60 explicit GeolocationPermissionContextAndroid(Profile* profile); |
61 ~GeolocationPermissionContextAndroid() override; | 61 ~GeolocationPermissionContextAndroid() override; |
62 | 62 |
63 protected: | 63 protected: |
64 // GeolocationPermissionContext: | 64 // GeolocationPermissionContext: |
65 ContentSetting GetPermissionStatusInternal( | 65 PermissionResult GetPermissionStatusInternal( |
66 content::RenderFrameHost* render_frame_host, | 66 content::RenderFrameHost* render_frame_host, |
67 const GURL& requesting_origin, | 67 const GURL& requesting_origin, |
68 const GURL& embedding_origin) const override; | 68 const GURL& embedding_origin) const override; |
69 | 69 |
70 private: | 70 private: |
71 friend class GeolocationPermissionContextTests; | 71 friend class GeolocationPermissionContextTests; |
72 | 72 |
73 static void AddDayOffsetForTesting(int days); | 73 static void AddDayOffsetForTesting(int days); |
74 static void SetDSEOriginForTesting(const char* dse_origin); | 74 static void SetDSEOriginForTesting(const char* dse_origin); |
75 | 75 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 infobars::InfoBar* permission_update_infobar_; | 156 infobars::InfoBar* permission_update_infobar_; |
157 | 157 |
158 // Must be the last member, to ensure that it will be destroyed first, which | 158 // Must be the last member, to ensure that it will be destroyed first, which |
159 // will invalidate weak pointers. | 159 // will invalidate weak pointers. |
160 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; | 160 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; |
161 | 161 |
162 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); | 162 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); |
163 }; | 163 }; |
164 | 164 |
165 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ | 165 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ |
OLD | NEW |