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

Side by Side Diff: content/browser/geolocation/location_provider_android.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_provider_android.h" 5 #include "content/browser/geolocation/location_provider_android.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "content/browser/geolocation/location_api_adapter_android.h" 8 #include "content/browser/geolocation/location_api_adapter_android.h"
9 #include "content/public/common/geoposition.h" 9 #include "content/public/common/geoposition.h"
10 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 void LocationProviderAndroid::RequestRefresh() { 39 void LocationProviderAndroid::RequestRefresh() {
40 // Nothing to do here, android framework will call us back on new position. 40 // Nothing to do here, android framework will call us back on new position.
41 } 41 }
42 42
43 void LocationProviderAndroid::OnPermissionGranted() { 43 void LocationProviderAndroid::OnPermissionGranted() {
44 // Nothing to do here. 44 // Nothing to do here.
45 } 45 }
46 46
47 void LocationProviderAndroid::PauseProvider() {
48 AndroidLocationApiAdapter::GetInstance()->Pause();
49 }
50
51 void LocationProviderAndroid::ResumeProvider() {
52 AndroidLocationApiAdapter::GetInstance()->Resume();
53 }
54
47 LocationProvider* NewSystemLocationProvider() { 55 LocationProvider* NewSystemLocationProvider() {
48 return new LocationProviderAndroid; 56 return new LocationProviderAndroid;
49 } 57 }
50 58
51 } // namespace content 59 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698