summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport/GeolocationPermissions.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/GeolocationPermissions.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/GeolocationPermissions.cpp')
-rwxr-xr-xSource/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp b/Source/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp
index 36a9b61..fb29bd6 100755
--- a/Source/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp
+++ b/Source/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp
@@ -26,16 +26,16 @@
#include "config.h"
#include "GeolocationPermissions.h"
-#include "DOMWindow.h"
-#include "Frame.h"
-#include "Geolocation.h"
-#include "Navigator.h"
-#include "SQLiteDatabase.h"
-#include "SQLiteFileSystem.h"
-#include "SQLiteStatement.h"
-#include "SQLiteTransaction.h"
#include "WebViewCore.h"
+#include <DOMWindow.h>
+#include <Frame.h>
+#include <Geolocation.h>
+#include <Navigator.h>
+#include <SQLiteDatabase.h>
+#include <SQLiteFileSystem.h>
+#include <SQLiteStatement.h>
+#include <SQLiteTransaction.h>
#include <text/CString.h>
using namespace WebCore;
@@ -51,9 +51,8 @@ String GeolocationPermissions::s_databasePath;
static const char* databaseName = "GeolocationPermissions.db";
-GeolocationPermissions::GeolocationPermissions(WebViewCore* webViewCore, Frame* mainFrame)
+GeolocationPermissions::GeolocationPermissions(WebViewCore* webViewCore)
: m_webViewCore(webViewCore)
- , m_mainFrame(mainFrame)
, m_timer(this, &GeolocationPermissions::timerFired)
{
@@ -266,7 +265,7 @@ void GeolocationPermissions::maybeCallbackFrames(String origin, bool allow)
// or have their contents replaced. Even uniqueChildName is not unique when
// frames are dynamically deleted and created. Instead, we simply call back
// to the Geolocation object in all frames from the correct origin.
- for (Frame* frame = m_mainFrame; frame; frame = frame->tree()->traverseNext()) {
+ for (Frame* frame = m_webViewCore->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
if (origin == frame->document()->securityOrigin()->toString()) {
// If the page has changed, it may no longer have a Geolocation
// object.