diff options
author | Steve Block <steveblock@google.com> | 2010-04-26 00:08:57 -0700 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:14 +0100 |
commit | 5fb15a120c24faef11e5952a791c5af38c54b07e (patch) | |
tree | 6f31353fa8ba19ad7b7c596c9a6450fff1bfb1fd /WebCore | |
parent | 0cfd31de936072a6e5a8c23853485006ca7ae36b (diff) | |
download | external_webkit-5fb15a120c24faef11e5952a791c5af38c54b07e.zip external_webkit-5fb15a120c24faef11e5952a791c5af38c54b07e.tar.gz external_webkit-5fb15a120c24faef11e5952a791c5af38c54b07e.tar.bz2 |
Merge webkit.org at r58033 : Cherry-pick WebKit change 58061 to add Geolocation::suspend()/resume() back in
See http://trac.webkit.org/changeset/58061
Change-Id: Ie7b4b4891391656a6cc25cd30b3913f0638a0302
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/page/Geolocation.cpp | 16 | ||||
-rw-r--r-- | WebCore/page/Geolocation.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index 8abf417..36e14f6 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -398,6 +398,22 @@ void Geolocation::clearWatch(int watchId) stopUpdating(); } +void Geolocation::suspend() +{ +#if !ENABLE(CLIENT_BASED_GEOLOCATION) + if (hasListeners()) + m_service->suspend(); +#endif +} + +void Geolocation::resume() +{ +#if !ENABLE(CLIENT_BASED_GEOLOCATION) + if (hasListeners()) + m_service->resume(); +#endif +} + void Geolocation::setIsAllowed(bool allowed) { // This may be due to either a new position from the service, or a cached diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h index b4e5bef..ba4f149 100644 --- a/WebCore/page/Geolocation.h +++ b/WebCore/page/Geolocation.h @@ -66,6 +66,10 @@ public: int watchPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>); void clearWatch(int watchId); + // These methods are used by Android. + void suspend(); + void resume(); + void setIsAllowed(bool); Frame* frame() const { return m_frame; } |