| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 static const char permissionDeniedErrorMessage[] = "User denied Geolocation"; | 41 static const char permissionDeniedErrorMessage[] = "User denied Geolocation"; |
| 42 static const char failedToStartServiceErrorMessage[] = "Failed to start Geolocat
ion service"; | 42 static const char failedToStartServiceErrorMessage[] = "Failed to start Geolocat
ion service"; |
| 43 static const char framelessDocumentErrorMessage[] = "Geolocation cannot be used
in frameless documents"; | 43 static const char framelessDocumentErrorMessage[] = "Geolocation cannot be used
in frameless documents"; |
| 44 | 44 |
| 45 static PassRefPtrWillBeRawPtr<Geoposition> createGeoposition(GeolocationPosition
* position) | 45 static PassRefPtrWillBeRawPtr<Geoposition> createGeoposition(GeolocationPosition
* position) |
| 46 { | 46 { |
| 47 if (!position) | 47 if (!position) |
| 48 return 0; | 48 return nullptr; |
| 49 | 49 |
| 50 RefPtrWillBeRawPtr<Coordinates> coordinates = Coordinates::create( | 50 RefPtrWillBeRawPtr<Coordinates> coordinates = Coordinates::create( |
| 51 position->latitude(), | 51 position->latitude(), |
| 52 position->longitude(), | 52 position->longitude(), |
| 53 position->canProvideAltitude(), | 53 position->canProvideAltitude(), |
| 54 position->altitude(), | 54 position->altitude(), |
| 55 position->accuracy(), | 55 position->accuracy(), |
| 56 position->canProvideAltitudeAccuracy(), | 56 position->canProvideAltitudeAccuracy(), |
| 57 position->altitudeAccuracy(), | 57 position->altitudeAccuracy(), |
| 58 position->canProvideHeading(), | 58 position->canProvideHeading(), |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 notifier->startTimerIfNeeded(); | 705 notifier->startTimerIfNeeded(); |
| 706 else | 706 else |
| 707 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); | 707 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); |
| 708 } else { | 708 } else { |
| 709 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); | 709 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, permissionDeniedErrorMessage)); |
| 710 } | 710 } |
| 711 } | 711 } |
| 712 } | 712 } |
| 713 | 713 |
| 714 } // namespace WebCore | 714 } // namespace WebCore |
| OLD | NEW |