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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 { | 145 { |
146 ASSERT(frame()); | 146 ASSERT(frame()); |
147 | 147 |
148 Document* document = this->document(); | 148 Document* document = this->document(); |
149 ASSERT(document); | 149 ASSERT(document); |
150 | 150 |
151 // It is required by isPrivilegedContext() but isn't | 151 // It is required by isPrivilegedContext() 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 UseCounter::Feature counter = document->isPrivilegedContext(insecureOriginMs
g) | 155 if (document->isPrivilegedContext(insecureOriginMsg)) |
156 ? UseCounter::GeolocationSecureOrigin | 156 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); |
157 : UseCounter::GeolocationInsecureOrigin; | 157 else |
158 UseCounter::count(document, counter); | 158 UseCounter::countDeprecation(document, UseCounter::GeolocationInsecureOr
igin); |
159 } | 159 } |
160 | 160 |
161 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) | 161 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position
ErrorCallback* errorCallback, const PositionOptions& options) |
162 { | 162 { |
163 if (!frame()) | 163 if (!frame()) |
164 return; | 164 return; |
165 | 165 |
166 recordOriginTypeAccess(); | 166 recordOriginTypeAccess(); |
167 | 167 |
168 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall
back, options); | 168 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall
back, options); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 notifier->startTimer(); | 535 notifier->startTimer(); |
536 else | 536 else |
537 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 537 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
538 } else { | 538 } else { |
539 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 539 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
540 } | 540 } |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 } // namespace blink | 544 } // namespace blink |
OLD | NEW |