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 void startRequest(GeoNotifier*); | 157 void startRequest(GeoNotifier*); |
158 | 158 |
159 bool haveSuitableCachedPosition(const PositionOptions&); | 159 bool haveSuitableCachedPosition(const PositionOptions&); |
160 | 160 |
161 // Runs the success callbacks for the set of notifiers awaiting a cached | 161 // Runs the success callbacks for the set of notifiers awaiting a cached |
162 // position, the set is then cleared. The oneshots are removed everywhere. | 162 // position, the set is then cleared. The oneshots are removed everywhere. |
163 void makeCachedPositionCallbacks(); | 163 void makeCachedPositionCallbacks(); |
164 | 164 |
165 // Record whether the origin trying to access Geolocation would be allowed | 165 // Record whether the origin trying to access Geolocation would be allowed |
166 // to access a feature that can only be accessed by secure origins. | 166 // to access a feature that can only be accessed by secure origins. |
167 // See http://goo.gl/lq4gCo | 167 // See https://goo.gl/Y0ZkNV |
168 void recordOriginTypeAccess() const; | 168 void recordOriginTypeAccess() const; |
169 | 169 |
170 GeoNotifierSet m_oneShots; | 170 GeoNotifierSet m_oneShots; |
171 GeolocationWatchers m_watchers; | 171 GeolocationWatchers m_watchers; |
172 GeoNotifierSet m_pendingForPermissionNotifiers; | 172 GeoNotifierSet m_pendingForPermissionNotifiers; |
173 Member<Geoposition> m_lastPosition; | 173 Member<Geoposition> m_lastPosition; |
174 | 174 |
175 // States of Geolocation permission as granted by the embedder. Unknown | 175 // States of Geolocation permission as granted by the embedder. Unknown |
176 // means that the embedder still has to be asked for the current permission | 176 // means that the embedder still has to be asked for the current permission |
177 // level; Requested means that the user has yet to make a decision. | 177 // level; Requested means that the user has yet to make a decision. |
178 enum Permission { | 178 enum Permission { |
179 PermissionUnknown, | 179 PermissionUnknown, |
180 PermissionRequested, | 180 PermissionRequested, |
181 PermissionAllowed, | 181 PermissionAllowed, |
182 PermissionDenied | 182 PermissionDenied |
183 }; | 183 }; |
184 | 184 |
185 Permission m_geolocationPermission; | 185 Permission m_geolocationPermission; |
186 | 186 |
187 GeoNotifierSet m_requestsAwaitingCachedPosition; | 187 GeoNotifierSet m_requestsAwaitingCachedPosition; |
188 }; | 188 }; |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
191 | 191 |
192 #endif // Geolocation_h | 192 #endif // Geolocation_h |
OLD | NEW |