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

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

Issue 2743603002: Reflect device status in geolocation permissions.request calls. (Closed)
Patch Set: Self review Created 3 years, 9 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool user_gesture, 64 bool user_gesture,
65 const BrowserPermissionCallback& callback) override; 65 const BrowserPermissionCallback& callback) override;
66 void CancelPermissionRequest(content::WebContents* web_contents, 66 void CancelPermissionRequest(content::WebContents* web_contents,
67 const PermissionRequestID& id) override; 67 const PermissionRequestID& id) override;
68 void NotifyPermissionSet(const PermissionRequestID& id, 68 void NotifyPermissionSet(const PermissionRequestID& id,
69 const GURL& requesting_origin, 69 const GURL& requesting_origin,
70 const GURL& embedding_origin, 70 const GURL& embedding_origin,
71 const BrowserPermissionCallback& callback, 71 const BrowserPermissionCallback& callback,
72 bool persist, 72 bool persist,
73 ContentSetting content_setting) override; 73 ContentSetting content_setting) override;
74 PermissionResult UpdatePermissionStatusWithDeviceStatus(
raymes 2017/03/10 02:53:31 Something for future thought: I wonder if this wou
benwells 2017/03/10 04:19:19 Acknowledged.
75 PermissionResult result,
76 const GURL& requesting_origin,
77 const GURL& embedding_origin) const override;
74 78
75 bool IsLocationAccessPossible(content::WebContents* web_contents, 79 bool IsLocationAccessPossible(content::WebContents* web_contents,
76 const GURL& requesting_origin, 80 const GURL& requesting_origin,
77 bool user_gesture); 81 bool user_gesture);
78 82
79 LocationSettingsDialogContext GetLocationSettingsDialogContext( 83 LocationSettingsDialogContext GetLocationSettingsDialogContext(
80 const GURL& requesting_origin); 84 const GURL& requesting_origin) const;
81 85
82 void HandleUpdateAndroidPermissions(const PermissionRequestID& id, 86 void HandleUpdateAndroidPermissions(const PermissionRequestID& id,
83 const GURL& requesting_frame_origin, 87 const GURL& requesting_frame_origin,
84 const GURL& embedding_origin, 88 const GURL& embedding_origin,
85 const BrowserPermissionCallback& callback, 89 const BrowserPermissionCallback& callback,
86 bool permissions_updated); 90 bool permissions_updated);
87 91
88 // Will return true if the location settings dialog will be shown for the 92 // Will return true if the location settings dialog will be shown for the
89 // given origins. This is true if the location setting is off, the dialog can 93 // given origins. This is true if the location setting is off, the dialog can
90 // be shown, any gesture requirements for the origin are met, and the dialog 94 // be shown, any gesture requirements for the origin are met, and the dialog
91 // is not being suppressed for backoff. 95 // is not being suppressed for backoff.
92 bool CanShowLocationSettingsDialog(const GURL& requesting_origin, 96 bool CanShowLocationSettingsDialog(const GURL& requesting_origin,
93 bool user_gesture); 97 bool user_gesture) const;
94 98
95 void OnLocationSettingsDialogShown( 99 void OnLocationSettingsDialogShown(
96 const PermissionRequestID& id, 100 const PermissionRequestID& id,
97 const GURL& requesting_origin, 101 const GURL& requesting_origin,
98 const GURL& embedding_origin, 102 const GURL& embedding_origin,
99 const BrowserPermissionCallback& callback, 103 const BrowserPermissionCallback& callback,
100 bool persist, 104 bool persist,
101 ContentSetting content_setting, 105 ContentSetting content_setting,
102 LocationSettingsDialogOutcome prompt_outcome); 106 LocationSettingsDialogOutcome prompt_outcome);
103 107
(...skipping 15 matching lines...) Expand all
119 infobars::InfoBar* permission_update_infobar_; 123 infobars::InfoBar* permission_update_infobar_;
120 124
121 // Must be the last member, to ensure that it will be destroyed first, which 125 // Must be the last member, to ensure that it will be destroyed first, which
122 // will invalidate weak pointers. 126 // will invalidate weak pointers.
123 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; 127 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_;
124 128
125 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); 129 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid);
126 }; 130 };
127 131
128 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 132 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698