| 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 recordOriginTypeAccess(); | 173 recordOriginTypeAccess(); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 notifier->startTimer(); | 552 notifier->startTimer(); |
| 551 else | 553 else |
| 552 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 554 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
| 553 } else { | 555 } else { |
| 554 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 556 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
| 555 } | 557 } |
| 556 } | 558 } |
| 557 } | 559 } |
| 558 | 560 |
| 559 } // namespace blink | 561 } // namespace blink |
| OLD | NEW |