Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: Source/modules/geolocation/GeolocationController.cpp

Issue 319863003: Enable Oilpan for modules/geolocation by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void GeolocationController::cancelPermissionRequest(Geolocation* geolocation) 143 void GeolocationController::cancelPermissionRequest(Geolocation* geolocation)
144 { 144 {
145 if (m_client) 145 if (m_client)
146 m_client->cancelPermissionRequest(geolocation); 146 m_client->cancelPermissionRequest(geolocation);
147 } 147 }
148 148
149 void GeolocationController::positionChanged(GeolocationPosition* position) 149 void GeolocationController::positionChanged(GeolocationPosition* position)
150 { 150 {
151 position = m_inspectorAgent->overrideGeolocationPosition(position); 151 position = m_inspectorAgent->overrideGeolocationPosition(position);
152 if (!position) { 152 if (!position) {
153 errorOccurred(GeolocationError::create(GeolocationError::PositionUnavail able, "PositionUnavailable").get()); 153 errorOccurred(GeolocationError::create(GeolocationError::PositionUnavail able, "PositionUnavailable"));
154 return; 154 return;
155 } 155 }
156 m_lastPosition = position; 156 m_lastPosition = position;
157 WillBeHeapVector<RefPtrWillBeMember<Geolocation> > observersVector; 157 HeapVector<Member<Geolocation> > observersVector;
158 copyToVector(m_observers, observersVector); 158 copyToVector(m_observers, observersVector);
159 for (size_t i = 0; i < observersVector.size(); ++i) 159 for (size_t i = 0; i < observersVector.size(); ++i)
160 observersVector[i]->positionChanged(); 160 observersVector[i]->positionChanged();
161 } 161 }
162 162
163 void GeolocationController::errorOccurred(GeolocationError* error) 163 void GeolocationController::errorOccurred(GeolocationError* error)
164 { 164 {
165 WillBeHeapVector<RefPtrWillBeMember<Geolocation> > observersVector; 165 HeapVector<Member<Geolocation> > observersVector;
166 copyToVector(m_observers, observersVector); 166 copyToVector(m_observers, observersVector);
167 for (size_t i = 0; i < observersVector.size(); ++i) 167 for (size_t i = 0; i < observersVector.size(); ++i)
168 observersVector[i]->setError(error); 168 observersVector[i]->setError(error);
169 } 169 }
170 170
171 GeolocationPosition* GeolocationController::lastPosition() 171 GeolocationPosition* GeolocationController::lastPosition()
172 { 172 {
173 if (m_lastPosition.get()) 173 if (m_lastPosition.get())
174 return m_lastPosition.get(); 174 return m_lastPosition.get();
175 175
(...skipping 28 matching lines...) Expand all
204 { 204 {
205 return "GeolocationController"; 205 return "GeolocationController";
206 } 206 }
207 207
208 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) 208 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client)
209 { 209 {
210 Supplement<LocalFrame>::provideTo(frame, GeolocationController::supplementNa me(), GeolocationController::create(frame, client)); 210 Supplement<LocalFrame>::provideTo(frame, GeolocationController::supplementNa me(), GeolocationController::create(frame, client));
211 } 211 }
212 212
213 } // namespace WebCore 213 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698