| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (m_hasClientForTest) | 89 if (m_hasClientForTest) |
| 90 m_client->controllerForTestRemoved(this); | 90 m_client->controllerForTestRemoved(this); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void GeolocationController::willBeDestroyed() | 93 void GeolocationController::willBeDestroyed() |
| 94 { | 94 { |
| 95 if (m_client) | 95 if (m_client) |
| 96 m_client->geolocationDestroyed(); | 96 m_client->geolocationDestroyed(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void GeolocationController::persistentHostHasBeenDestroyed() |
| 100 { |
| 101 observeContext(0); |
| 102 } |
| 103 |
| 99 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca
lFrame& frame, GeolocationClient* client) | 104 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca
lFrame& frame, GeolocationClient* client) |
| 100 { | 105 { |
| 101 return adoptPtrWillBeNoop(new GeolocationController(frame, client)); | 106 return adoptPtrWillBeNoop(new GeolocationController(frame, client)); |
| 102 } | 107 } |
| 103 | 108 |
| 104 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc
curacy) | 109 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc
curacy) |
| 105 { | 110 { |
| 106 // This may be called multiple times with the same observer, though removeOb
server() | 111 // This may be called multiple times with the same observer, though removeOb
server() |
| 107 // is called only once with each. | 112 // is called only once with each. |
| 108 bool wasEmpty = m_observers.isEmpty(); | 113 bool wasEmpty = m_observers.isEmpty(); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 visitor->trace(m_highAccuracyObservers); | 217 visitor->trace(m_highAccuracyObservers); |
| 213 WillBeHeapSupplement<LocalFrame>::trace(visitor); | 218 WillBeHeapSupplement<LocalFrame>::trace(visitor); |
| 214 } | 219 } |
| 215 | 220 |
| 216 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) | 221 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) |
| 217 { | 222 { |
| 218 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su
pplementName(), GeolocationController::create(frame, client)); | 223 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su
pplementName(), GeolocationController::create(frame, client)); |
| 219 } | 224 } |
| 220 | 225 |
| 221 } // namespace WebCore | 226 } // namespace WebCore |
| OLD | NEW |