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 26 matching lines...) Expand all Loading... | |
37 class LocationSettings; | 37 class LocationSettings; |
38 class GURL; | 38 class GURL; |
39 class PermissionRequestID; | 39 class PermissionRequestID; |
40 | 40 |
41 class GeolocationPermissionContextAndroid | 41 class GeolocationPermissionContextAndroid |
42 : public GeolocationPermissionContext { | 42 : public GeolocationPermissionContext { |
43 public: | 43 public: |
44 explicit GeolocationPermissionContextAndroid(Profile* profile); | 44 explicit GeolocationPermissionContextAndroid(Profile* profile); |
45 ~GeolocationPermissionContextAndroid() override; | 45 ~GeolocationPermissionContextAndroid() override; |
46 | 46 |
47 protected: | |
48 ContentSetting GetPermissionStatusInternal( | |
sky
2017/01/11 15:36:44
Add description with where this override comes fro
benwells
2017/01/11 22:29:26
Done.
| |
49 const GURL& requesting_origin, | |
50 const GURL& embedding_origin) const override; | |
51 | |
47 private: | 52 private: |
48 friend class GeolocationPermissionContextTests; | 53 friend class GeolocationPermissionContextTests; |
49 | 54 |
50 // GeolocationPermissionContext: | 55 // GeolocationPermissionContext: |
51 void RequestPermission( | 56 void RequestPermission( |
52 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
53 const PermissionRequestID& id, | 58 const PermissionRequestID& id, |
54 const GURL& requesting_frame_origin, | 59 const GURL& requesting_frame_origin, |
55 bool user_gesture, | 60 bool user_gesture, |
56 const BrowserPermissionCallback& callback) override; | 61 const BrowserPermissionCallback& callback) override; |
(...skipping 17 matching lines...) Expand all Loading... | |
74 infobars::InfoBar* permission_update_infobar_; | 79 infobars::InfoBar* permission_update_infobar_; |
75 | 80 |
76 // Must be the last member, to ensure that it will be destroyed first, which | 81 // Must be the last member, to ensure that it will be destroyed first, which |
77 // will invalidate weak pointers. | 82 // will invalidate weak pointers. |
78 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; | 83 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; |
79 | 84 |
80 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); | 85 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); |
81 }; | 86 }; |
82 | 87 |
83 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ | 88 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ |
OLD | NEW |