OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. |
3 * Copyright 2010, The Android Open Source Project | 3 * Copyright 2010, The Android Open Source Project |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 // the cached position or by requesting one from the controller. Sets a | 157 // the cached position or by requesting one from the controller. Sets a |
158 // fatal error if permission is denied or no position can be obtained. | 158 // fatal error if permission is denied or no position can be obtained. |
159 void startRequest(GeoNotifier*); | 159 void startRequest(GeoNotifier*); |
160 | 160 |
161 bool haveSuitableCachedPosition(PositionOptions*); | 161 bool haveSuitableCachedPosition(PositionOptions*); |
162 | 162 |
163 // Runs the success callbacks for the set of notifiers awaiting a cached | 163 // Runs the success callbacks for the set of notifiers awaiting a cached |
164 // position, the set is then cleared. The oneshots are removed everywhere. | 164 // position, the set is then cleared. The oneshots are removed everywhere. |
165 void makeCachedPositionCallbacks(); | 165 void makeCachedPositionCallbacks(); |
166 | 166 |
167 // Record whether the origin trying to access Geolocation would be allowed | |
168 // to access a feature that can only be accessed by secure origins. | |
169 // See http://goo.gl/lq4gCo | |
170 void RecordOriginTypeAccess(); | |
Peter Beverloo
2014/10/02 14:58:24
nit: Should start with a lower-case character per
mlamouri (slow - plz ping)
2014/10/02 15:44:54
Done.
| |
171 | |
167 GeoNotifierSet m_oneShots; | 172 GeoNotifierSet m_oneShots; |
168 GeolocationWatchers m_watchers; | 173 GeolocationWatchers m_watchers; |
169 GeoNotifierSet m_pendingForPermissionNotifiers; | 174 GeoNotifierSet m_pendingForPermissionNotifiers; |
170 Member<Geoposition> m_lastPosition; | 175 Member<Geoposition> m_lastPosition; |
171 | 176 |
172 // States of Geolocation permission as granted by the embedder. Unknown | 177 // States of Geolocation permission as granted by the embedder. Unknown |
173 // means that the embedder still has to be asked for the current permission | 178 // means that the embedder still has to be asked for the current permission |
174 // level; Requested means that the user has yet to make a decision. | 179 // level; Requested means that the user has yet to make a decision. |
175 enum Permission { | 180 enum Permission { |
176 PermissionUnknown, | 181 PermissionUnknown, |
177 PermissionRequested, | 182 PermissionRequested, |
178 PermissionAllowed, | 183 PermissionAllowed, |
179 PermissionDenied | 184 PermissionDenied |
180 }; | 185 }; |
181 | 186 |
182 Permission m_geolocationPermission; | 187 Permission m_geolocationPermission; |
183 | 188 |
184 GeoNotifierSet m_requestsAwaitingCachedPosition; | 189 GeoNotifierSet m_requestsAwaitingCachedPosition; |
185 }; | 190 }; |
186 | 191 |
187 } // namespace blink | 192 } // namespace blink |
188 | 193 |
189 #endif // Geolocation_h | 194 #endif // Geolocation_h |
OLD | NEW |