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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 | 132 |
133 Geoposition* Geolocation::lastPosition() | 133 Geoposition* Geolocation::lastPosition() |
134 { | 134 { |
135 LocalFrame* frame = this->frame(); | 135 LocalFrame* frame = this->frame(); |
136 if (!frame) | 136 if (!frame) |
137 return 0; | 137 return 0; |
138 | 138 |
139 m_lastPosition = createGeoposition(GeolocationController::from(frame)->lastP
osition()); | 139 m_lastPosition = createGeoposition(GeolocationController::from(frame)->lastP
osition()); |
140 | 140 |
141 return m_lastPosition.get(); | 141 return m_lastPosition; |
142 } | 142 } |
143 | 143 |
144 void Geolocation::recordOriginTypeAccess() const | 144 void Geolocation::recordOriginTypeAccess() const |
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 isSecureContext() but isn't | 151 // It is required by isSecureContext() but isn't |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 notifier->startTimer(); | 534 notifier->startTimer(); |
535 else | 535 else |
536 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 536 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
537 } else { | 537 } else { |
538 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 538 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
539 } | 539 } |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 } // namespace blink | 543 } // namespace blink |
OLD | NEW |