| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 Document* document = this->document(); | 148 Document* document = this->document(); |
| 149 ASSERT(document); | 149 ASSERT(document); |
| 150 | 150 |
| 151 // It is required by isSecureContext() but isn't | 151 // It is required by isSecureContext() but isn't |
| 152 // actually used. This could be used later if a warning is shown in the | 152 // actually used. This could be used later if a warning is shown in the |
| 153 // developer console. | 153 // developer console. |
| 154 String insecureOriginMsg; | 154 String insecureOriginMsg; |
| 155 if (document->isSecureContext(insecureOriginMsg)) { | 155 if (document->isSecureContext(insecureOriginMsg)) { |
| 156 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); | 156 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); |
| 157 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSec
ureOriginIframe); | 157 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSec
ureOriginIframe); |
| 158 } else if (frame()->settings()->allowGeolocationOnInsecureOrigins()) { |
| 159 // TODO(jww): This should be removed after WebView is fixed so that it |
| 160 // disallows geolocation in insecure contexts. |
| 161 // |
| 162 // See https://crbug.com/603574. |
| 163 Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureO
riginDeprecatedNotRemoved); |
| 164 Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::Ge
olocationInsecureOriginIframeDeprecatedNotRemoved); |
| 165 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GeolocationInsecureOrigin); |
| 158 } else { | 166 } else { |
| 159 Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureO
rigin); | 167 Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureO
rigin); |
| 160 Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::Ge
olocationInsecureOriginIframe); | 168 Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::Ge
olocationInsecureOriginIframe); |
| 161 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GeolocationInsecureOrigin); | 169 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GeolocationInsecureOrigin); |
| 162 } | 170 } |
| 163 } | 171 } |
| 164 | 172 |
| 165 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) | 173 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) |
| 166 { | 174 { |
| 167 if (!frame()) | 175 if (!frame()) |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 notifier->startTimer(); | 542 notifier->startTimer(); |
| 535 else | 543 else |
| 536 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 544 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
| 537 } else { | 545 } else { |
| 538 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 546 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
| 539 } | 547 } |
| 540 } | 548 } |
| 541 } | 549 } |
| 542 | 550 |
| 543 } // namespace blink | 551 } // namespace blink |
| OLD | NEW |