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

Side by Side Diff: content/public/browser/geolocation_provider.h

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 #ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_
6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_ 6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // that serves a fake location. 48 // that serves a fake location.
49 // 49 //
50 // Do not use this function in unit tests. The function instantiates the 50 // Do not use this function in unit tests. The function instantiates the
51 // singleton geolocation stack in the background and manipulates it to report 51 // singleton geolocation stack in the background and manipulates it to report
52 // a fake location. Neither step can be undone, breaking unit test isolation 52 // a fake location. Neither step can be undone, breaking unit test isolation
53 // (crbug.com/125931). 53 // (crbug.com/125931).
54 static void OverrideLocationForTesting( 54 static void OverrideLocationForTesting(
55 const Geoposition& position, 55 const Geoposition& position,
56 const base::Closure& completion_callback); 56 const base::Closure& completion_callback);
57 57
58 // Pauses (or resume any currently paused) location update callbacks.
59 // No-op if there are no active location callbacks. Note that this will
60 // pause (or resume) ALL callbacks for ALL providers. Embderred may like
61 // to use this to pause updates if a device was to go to a temporary
62 // low power mode.
63 virtual void PauseAllLocationUpdateCallbacks() = 0;
64 virtual void ResumeAllLocationUpdateCallbacks() = 0;
65
66
58 protected: 67 protected:
59 virtual~GeolocationProvider() {} 68 virtual~GeolocationProvider() {}
60 }; 69 };
61 70
62 } // namespace content 71 } // namespace content
63 72
64 #endif // CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_ 73 #endif // CONTENT_PUBLIC_BROWSER_GEOLOCATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698