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 (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
4 * Copyright 2010, The Android Open Source Project | 4 * Copyright 2010, The Android Open Source Project |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 Document* document = this->document(); | 151 Document* document = this->document(); |
152 ASSERT(document); | 152 ASSERT(document); |
153 | 153 |
154 // It is required by isSecureContext() but isn't | 154 // It is required by isSecureContext() but isn't |
155 // actually used. This could be used later if a warning is shown in the | 155 // actually used. This could be used later if a warning is shown in the |
156 // developer console. | 156 // developer console. |
157 String insecureOriginMsg; | 157 String insecureOriginMsg; |
158 if (document->isSecureContext(insecureOriginMsg)) { | 158 if (document->isSecureContext(insecureOriginMsg)) { |
159 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); | 159 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); |
| 160 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSec
ureOriginIframe); |
160 } else { | 161 } else { |
161 UseCounter::countDeprecation(document, UseCounter::GeolocationInsecureOr
igin); | 162 UseCounter::countDeprecation(document, UseCounter::GeolocationInsecureOr
igin); |
| 163 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationIns
ecureOriginIframe); |
162 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GeolocationInsecureOrigin); | 164 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GeolocationInsecureOrigin); |
163 } | 165 } |
164 } | 166 } |
165 | 167 |
166 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) | 168 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) |
167 { | 169 { |
168 if (!frame()) | 170 if (!frame()) |
169 return; | 171 return; |
170 | 172 |
171 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall
back, options); | 173 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall
back, options); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 notifier->startTimer(); | 547 notifier->startTimer(); |
546 else | 548 else |
547 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 549 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
548 } else { | 550 } else { |
549 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 551 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
550 } | 552 } |
551 } | 553 } |
552 } | 554 } |
553 | 555 |
554 } // namespace blink | 556 } // namespace blink |
OLD | NEW |