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

Side by Side Diff: content/browser/geolocation/location_arbitrator_impl.cc

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wire up onPause/onResume Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/geolocation/location_arbitrator_impl.h" 5 #include "content/browser/geolocation/location_arbitrator_impl.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return true; 194 return true;
195 } 195 }
196 } 196 }
197 return false; 197 return false;
198 } 198 }
199 199
200 bool LocationArbitratorImpl::HasPermissionBeenGranted() const { 200 bool LocationArbitratorImpl::HasPermissionBeenGranted() const {
201 return is_permission_granted_; 201 return is_permission_granted_;
202 } 202 }
203 203
204 void LocationArbitratorImpl::PauseProviders() {
205 for (ScopedVector<LocationProvider>::iterator i = providers_.begin();
206 i != providers_.end(); ++i) {
207 (*i)->PauseProvider();
208 }
209 }
210
211 void LocationArbitratorImpl::ResumeProviders() {
212 for (ScopedVector<LocationProvider>::iterator i = providers_.begin();
213 i != providers_.end(); ++i) {
214 (*i)->ResumeProvider();
215 }
216 }
217
204 } // namespace content 218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698