Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_android.h

Issue 2110343002: Reintroduce plumbing for user gesture into permission system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ~GeolocationPermissionContextAndroid() override; 45 ~GeolocationPermissionContextAndroid() override;
46 46
47 private: 47 private:
48 friend class GeolocationPermissionContextTests; 48 friend class GeolocationPermissionContextTests;
49 49
50 // GeolocationPermissionContext: 50 // GeolocationPermissionContext:
51 void RequestPermission( 51 void RequestPermission(
52 content::WebContents* web_contents, 52 content::WebContents* web_contents,
53 const PermissionRequestID& id, 53 const PermissionRequestID& id,
54 const GURL& requesting_frame_origin, 54 const GURL& requesting_frame_origin,
55 bool user_gesture,
55 const BrowserPermissionCallback& callback) override; 56 const BrowserPermissionCallback& callback) override;
56 void CancelPermissionRequest(content::WebContents* web_contents, 57 void CancelPermissionRequest(content::WebContents* web_contents,
57 const PermissionRequestID& id) override; 58 const PermissionRequestID& id) override;
58 59
59 void HandleUpdateAndroidPermissions(const PermissionRequestID& id, 60 void HandleUpdateAndroidPermissions(const PermissionRequestID& id,
60 const GURL& requesting_frame_origin, 61 const GURL& requesting_frame_origin,
61 const GURL& embedding_origin, 62 const GURL& embedding_origin,
62 const BrowserPermissionCallback& callback, 63 const BrowserPermissionCallback& callback,
63 bool permissions_updated); 64 bool permissions_updated);
64 65
65 // Overrides the LocationSettings object used to determine whether 66 // Overrides the LocationSettings object used to determine whether
66 // system and Chrome-wide location permissions are enabled. 67 // system and Chrome-wide location permissions are enabled.
67 void SetLocationSettingsForTesting( 68 void SetLocationSettingsForTesting(
68 std::unique_ptr<LocationSettings> settings); 69 std::unique_ptr<LocationSettings> settings);
69 70
70 std::unique_ptr<LocationSettings> location_settings_; 71 std::unique_ptr<LocationSettings> location_settings_;
71 72
72 // This is owned by the InfoBarService (owner of the InfoBar). 73 // This is owned by the InfoBarService (owner of the InfoBar).
73 infobars::InfoBar* permission_update_infobar_; 74 infobars::InfoBar* permission_update_infobar_;
74 75
75 // Must be the last member, to ensure that it will be destroyed first, which 76 // Must be the last member, to ensure that it will be destroyed first, which
76 // will invalidate weak pointers. 77 // will invalidate weak pointers.
77 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; 78 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); 80 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid);
80 }; 81 };
81 82
82 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 83 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698