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

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

Issue 5612005: Client-based geolocation support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on trunk 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_shell.cc
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index aaa6d37b3222b7215843e3bfea1db5518bf4b15b..fc4c7e713728dcec0e608851564eb7df97403cf7 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -34,6 +34,9 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClientMock.h"
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
+#endif
#include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@@ -647,6 +650,10 @@ void TestShell::ResetTestController() {
event_sending_controller_->Reset();
notification_presenter_->Reset();
delegate_->Reset();
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ if (geolocation_client_mock_.get())
+ geolocation_client_mock_->resetMock();
+#endif
}
void TestShell::LoadFile(const FilePath& file) {
@@ -786,6 +793,16 @@ TestShell::speech_input_controller_mock() {
return speech_input_controller_mock_.get();
}
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
+ if (!geolocation_client_mock_.get()) {
+ geolocation_client_mock_.reset(
+ WebKit::WebGeolocationClientMock::create());
+ }
+ return geolocation_client_mock_.get();
+}
+#endif
+
//-----------------------------------------------------------------------------
namespace webkit_glue {

Powered by Google App Engine
This is Rietveld 408576698