summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-05-15 19:57:09 +0100
committerSteve Block <steveblock@google.com>2012-05-18 12:16:05 +0100
commit084a2f00a6b30ce87ec8a8eabbea3ac9cbfa6e7e (patch)
tree5d6415aa20fcd7d8bfa37ae8929b837b7b06c856 /Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
parent994281dc0404e16fd5e4e328e3358068f0e70846 (diff)
downloadexternal_webkit-084a2f00a6b30ce87ec8a8eabbea3ac9cbfa6e7e.zip
external_webkit-084a2f00a6b30ce87ec8a8eabbea3ac9cbfa6e7e.tar.gz
external_webkit-084a2f00a6b30ce87ec8a8eabbea3ac9cbfa6e7e.tar.bz2
GeolocationPermissions cleanup
- Avoid the need to pass the main frame to GeolocationPermissions. This can be determined from the WebViewCore. - Call GeolocationPermissions::maybeStorePermanentPermissions() directly from WebViewCore to avoid the need for a ChromeClient method. No functional change. Bug: 6511338 Change-Id: I80436e3728080338199a632890a64e573a658bba
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp')
-rw-r--r--Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index 907dc3c..e736087 100644
--- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -516,8 +516,9 @@ void ChromeClientAndroid::requestGeolocationPermissionForFrame(Frame* frame, Geo
{
ASSERT(geolocation);
if (!m_geolocationPermissions) {
- m_geolocationPermissions = new GeolocationPermissions(android::WebViewCore::getWebViewCore(frame->view()),
- m_webFrame->page()->mainFrame());
+ WebViewCore* webViewCore = android::WebViewCore::getWebViewCore(frame->view());
+ ASSERT(webViewCore->mainFrame() == m_webFrame->page()->mainFrame());
+ m_geolocationPermissions = new GeolocationPermissions(webViewCore);
}
m_geolocationPermissions->queryPermissionState(frame);
}
@@ -530,15 +531,9 @@ void ChromeClientAndroid::cancelGeolocationPermissionRequestForFrame(Frame* fram
void ChromeClientAndroid::provideGeolocationPermissions(const String &origin, bool allow, bool remember)
{
- ASSERT(m_geolocationPermissions);
m_geolocationPermissions->providePermissionState(origin, allow, remember);
}
-void ChromeClientAndroid::storeGeolocationPermissions()
-{
- GeolocationPermissions::maybeStorePermanentPermissions();
-}
-
void ChromeClientAndroid::onMainFrameLoadStarted()
{
if (m_geolocationPermissions.get())