This is part of the change required to fix a Geolocation permissions bug.
See https://android-git.corp.google.com/g/#change,40601
Note that We take only the WebCore component of the change, but additional
changes are required to ChromeClientAndroid.
See http://trac.webkit.org/changeset/55136
Change-Id: Iff0eab3adc3e41876df7f114c0d50243d015664f
m_client->requestGeolocationPermissionForFrame(frame, geolocation);
}
+void Chrome::cancelGeolocationPermissionRequestForFrame(Frame* frame)
+{
+ m_client->cancelGeolocationPermissionRequestForFrame(frame);
+}
+
void Chrome::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser)
{
m_client->runOpenPanel(frame, fileChooser);
void print(Frame*);
void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
+ void cancelGeolocationPermissionRequestForFrame(Frame*);
void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual bool paintCustomScrollCorner(GraphicsContext*, const FloatRect&);
// This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission
- // to use Geolococation. The ChromeClient must call Geolocation::setShouldClearCache() appropriately.
+ // to use Geolocation.
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) = 0;
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*) = 0;
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0;
void Geolocation::disconnectFrame()
{
stopUpdating();
- if (m_frame && m_frame->document())
- m_frame->document()->setUsingGeolocation(false);
+ if (m_frame) {
+ if (m_frame->document())
+ m_frame->document()->setUsingGeolocation(false);
+ if (m_frame->page() && m_allowGeolocation == InProgress)
+ m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame);
+ }
m_frame = 0;
}
// Methods used to request and provide Geolocation permissions.
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*) { }
// Android-specific
void provideGeolocationPermissions(const String &origin, bool allow, bool remember);
void storeGeolocationPermissions();