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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 5612005: Client-based geolocation support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/test_webview_delegate.cc
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 50541cdc527a04c7eea651be6d4f7143d30cc9fd..85ab1a9f2440952f7d6f2c46ecdb2608bbf9b008 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -33,6 +33,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
+#endif
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
@@ -654,9 +657,16 @@ WebNotificationPresenter* TestWebViewDelegate::notificationPresenter() {
return shell_->notification_presenter();
}
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+WebKit::WebGeolocationClient* TestWebViewDelegate::geolocationClient()
+{
joth 2010/12/07 10:24:51 { on prev line
John Knottenbelt 2010/12/07 12:30:04 Done.
+ return shell_->geolocation_client_mock();
+}
+#else
WebKit::WebGeolocationService* TestWebViewDelegate::geolocationService() {
return GetTestGeolocationService();
}
+#endif
WebKit::WebDeviceOrientationClient*
TestWebViewDelegate::deviceOrientationClient() {
@@ -1228,9 +1238,11 @@ void TestWebViewDelegate::WaitForPolicyDelegate() {
policy_delegate_should_notify_done_ = true;
}
+#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
void TestWebViewDelegate::SetGeolocationPermission(bool allowed) {
GetTestGeolocationService()->SetGeolocationPermission(allowed);
}
+#endif
// Private methods -----------------------------------------------------------
@@ -1352,11 +1364,13 @@ std::wstring TestWebViewDelegate::GetFrameDescription(WebFrame* webframe) {
}
}
+#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
TestGeolocationService* TestWebViewDelegate::GetTestGeolocationService() {
if (!test_geolocation_service_.get())
test_geolocation_service_.reset(new TestGeolocationService);
return test_geolocation_service_.get();
}
+#endif
void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
fake_rect_ = rect;
« webkit/tools/test_shell/test_shell.cc ('K') | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698