| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Once permission has been set (or denied) on a Geolocation object, there c
an be | 120 // Once permission has been set (or denied) on a Geolocation object, there c
an be |
| 121 // no further requests for permission to the mock. Consequently the callback
s | 121 // no further requests for permission to the mock. Consequently the callback
s |
| 122 // which fire synchronously from Geolocation::setIsAllowed() cannot reentran
tly modify | 122 // which fire synchronously from Geolocation::setIsAllowed() cannot reentran
tly modify |
| 123 // m_pendingPermissions. | 123 // m_pendingPermissions. |
| 124 for (GeolocationSet::iterator it = m_pendingPermissions.begin(); it != end;
++it) | 124 for (GeolocationSet::iterator it = m_pendingPermissions.begin(); it != end;
++it) |
| 125 (*it)->setIsAllowed(allowed); | 125 (*it)->setIsAllowed(allowed); |
| 126 m_pendingPermissions.clear(); | 126 m_pendingPermissions.clear(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void GeolocationClientMock::geolocationDestroyed() | |
| 130 { | |
| 131 ASSERT(!m_isActive); | |
| 132 } | |
| 133 | |
| 134 void GeolocationClientMock::startUpdating() | 129 void GeolocationClientMock::startUpdating() |
| 135 { | 130 { |
| 136 ASSERT(!m_isActive); | 131 ASSERT(!m_isActive); |
| 137 m_isActive = true; | 132 m_isActive = true; |
| 138 asyncUpdateController(); | 133 asyncUpdateController(); |
| 139 } | 134 } |
| 140 | 135 |
| 141 void GeolocationClientMock::stopUpdating() | 136 void GeolocationClientMock::stopUpdating() |
| 142 { | 137 { |
| 143 ASSERT(m_isActive); | 138 ASSERT(m_isActive); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 (*it)->errorOccurred(GeolocationError::create(GeolocationError::Posi
tionUnavailable, m_errorMessage)); | 172 (*it)->errorOccurred(GeolocationError::create(GeolocationError::Posi
tionUnavailable, m_errorMessage)); |
| 178 } | 173 } |
| 179 } | 174 } |
| 180 | 175 |
| 181 void GeolocationClientMock::clearError() | 176 void GeolocationClientMock::clearError() |
| 182 { | 177 { |
| 183 m_hasError = false; | 178 m_hasError = false; |
| 184 m_errorMessage = String(); | 179 m_errorMessage = String(); |
| 185 } | 180 } |
| 186 | 181 |
| 182 void GeolocationClientMock::trace(Visitor* visitor) |
| 183 { |
| 184 #if ENABLE(OILPAN) |
| 185 visitor->trace(m_controllers); |
| 186 #endif |
| 187 visitor->trace(m_lastPosition); |
| 188 visitor->trace(m_pendingPermissions); |
| 189 GeolocationClient::trace(visitor); |
| 190 } |
| 191 |
| 187 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |