| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 queryNextPosition(); | 519 queryNextPosition(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void Geolocation::pageVisibilityChanged() | 522 void Geolocation::pageVisibilityChanged() |
| 523 { | 523 { |
| 524 updateGeolocationServiceConnection(); | 524 updateGeolocationServiceConnection(); |
| 525 } | 525 } |
| 526 | 526 |
| 527 void Geolocation::onGeolocationConnectionError() | 527 void Geolocation::onGeolocationConnectionError() |
| 528 { | 528 { |
| 529 // If a request is outstanding at process shutdown, this error handler will | |
| 530 // be called. In that case, blink has already shut down so do nothing. | |
| 531 // | |
| 532 // TODO(sammc): Remove this once renderer shutdown is no longer graceful. | |
| 533 if (!Platform::current()) | |
| 534 return; | |
| 535 | |
| 536 PositionError* error = PositionError::create(PositionError::kPositionUnavail
able, failedToStartServiceErrorMessage); | 529 PositionError* error = PositionError::create(PositionError::kPositionUnavail
able, failedToStartServiceErrorMessage); |
| 537 error->setIsFatal(true); | 530 error->setIsFatal(true); |
| 538 handleError(error); | 531 handleError(error); |
| 539 } | 532 } |
| 540 | 533 |
| 541 void Geolocation::onPermissionConnectionError() | 534 void Geolocation::onPermissionConnectionError() |
| 542 { | 535 { |
| 543 // If a request is outstanding at process shutdown, this error handler will | |
| 544 // be called. In that case, blink has already shut down so do nothing. | |
| 545 // | |
| 546 // TODO(sammc): Remove this once renderer shutdown is no longer graceful. | |
| 547 if (!Platform::current()) | |
| 548 return; | |
| 549 | |
| 550 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); | 536 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); |
| 551 } | 537 } |
| 552 | 538 |
| 553 } // namespace blink | 539 } // namespace blink |
| OLD | NEW |