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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 void GeolocationClientMock::controllerForTestRemoved(GeolocationController* cont
roller) | 101 void GeolocationClientMock::controllerForTestRemoved(GeolocationController* cont
roller) |
102 { | 102 { |
103 m_controllers.remove(controller); | 103 m_controllers.remove(controller); |
104 } | 104 } |
105 | 105 |
106 void GeolocationClientMock::asyncUpdatePermission() | 106 void GeolocationClientMock::asyncUpdatePermission() |
107 { | 107 { |
108 ASSERT(m_permissionState != PermissionStateUnset); | 108 ASSERT(m_permissionState != PermissionStateUnset); |
109 if (!m_permissionTimer.isActive()) | 109 if (!m_permissionTimer.isActive()) |
110 m_permissionTimer.startOneShot(0, FROM_HERE); | 110 m_permissionTimer.startOneShot(0, BLINK_FROM_HERE); |
111 } | 111 } |
112 | 112 |
113 void GeolocationClientMock::permissionTimerFired(Timer<GeolocationClientMock>* t
imer) | 113 void GeolocationClientMock::permissionTimerFired(Timer<GeolocationClientMock>* t
imer) |
114 { | 114 { |
115 ASSERT_UNUSED(timer, timer == &m_permissionTimer); | 115 ASSERT_UNUSED(timer, timer == &m_permissionTimer); |
116 ASSERT(m_permissionState != PermissionStateUnset); | 116 ASSERT(m_permissionState != PermissionStateUnset); |
117 bool allowed = m_permissionState == PermissionStateAllowed; | 117 bool allowed = m_permissionState == PermissionStateAllowed; |
118 GeolocationSet::iterator end = m_pendingPermissions.end(); | 118 GeolocationSet::iterator end = m_pendingPermissions.end(); |
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 |
(...skipping 26 matching lines...) Expand all Loading... |
147 } | 147 } |
148 | 148 |
149 GeolocationPosition* GeolocationClientMock::lastPosition() | 149 GeolocationPosition* GeolocationClientMock::lastPosition() |
150 { | 150 { |
151 return m_lastPosition.get(); | 151 return m_lastPosition.get(); |
152 } | 152 } |
153 | 153 |
154 void GeolocationClientMock::asyncUpdateController() | 154 void GeolocationClientMock::asyncUpdateController() |
155 { | 155 { |
156 if (m_isActive && !m_controllerTimer.isActive()) | 156 if (m_isActive && !m_controllerTimer.isActive()) |
157 m_controllerTimer.startOneShot(0, FROM_HERE); | 157 m_controllerTimer.startOneShot(0, BLINK_FROM_HERE); |
158 } | 158 } |
159 | 159 |
160 void GeolocationClientMock::controllerTimerFired(Timer<GeolocationClientMock>* t
imer) | 160 void GeolocationClientMock::controllerTimerFired(Timer<GeolocationClientMock>* t
imer) |
161 { | 161 { |
162 ASSERT_UNUSED(timer, timer == &m_controllerTimer); | 162 ASSERT_UNUSED(timer, timer == &m_controllerTimer); |
163 | 163 |
164 // Make a copy of the set of controllers since it might be modified while it
erating. | 164 // Make a copy of the set of controllers since it might be modified while it
erating. |
165 GeolocationControllers controllers = m_controllers; | 165 GeolocationControllers controllers = m_controllers; |
166 if (m_lastPosition.get()) { | 166 if (m_lastPosition.get()) { |
167 ASSERT(!m_hasError); | 167 ASSERT(!m_hasError); |
(...skipping 15 matching lines...) Expand all Loading... |
183 { | 183 { |
184 #if ENABLE(OILPAN) | 184 #if ENABLE(OILPAN) |
185 visitor->trace(m_controllers); | 185 visitor->trace(m_controllers); |
186 #endif | 186 #endif |
187 visitor->trace(m_lastPosition); | 187 visitor->trace(m_lastPosition); |
188 visitor->trace(m_pendingPermissions); | 188 visitor->trace(m_pendingPermissions); |
189 GeolocationClient::trace(visitor); | 189 GeolocationClient::trace(visitor); |
190 } | 190 } |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
OLD | NEW |