summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/renderer/render_view.cc15
-rw-r--r--chrome/renderer/render_view.h9
-rw-r--r--webkit/tools/test_shell/test_shell.cc1
-rw-r--r--webkit/tools/test_shell/test_shell.h6
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc16
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h12
6 files changed, 37 insertions, 22 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 1a9aef5..b972506 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -5635,19 +5635,28 @@ void RenderView::OnPageTranslated() {
autofill_helper_->FrameContentsAvailable(frame);
}
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
WebKit::WebGeolocationClient* RenderView::geolocationClient() {
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
if (!geolocation_dispatcher_.get())
geolocation_dispatcher_.reset(new GeolocationDispatcher(this));
return geolocation_dispatcher_.get();
-}
#else
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
+ NOTREACHED();
+ return 0;
+#endif
+}
+
WebKit::WebGeolocationService* RenderView::geolocationService() {
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ NOTREACHED();
+ return 0;
+#else
if (!geolocation_dispatcher_.get())
geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this));
return geolocation_dispatcher_.get();
-}
#endif
+}
WebKit::WebSpeechInputController* RenderView::speechInputController(
WebKit::WebSpeechInputListener* listener) {
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 862ed6c..7760d26 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -497,11 +497,9 @@ class RenderView : public RenderWidget,
virtual void didClearAutoFillSelection(const WebKit::WebNode& node);
virtual void didAcceptAutocompleteSuggestion(
const WebKit::WebInputElement& element);
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
virtual WebKit::WebGeolocationClient* geolocationClient();
-#else
virtual WebKit::WebGeolocationService* geolocationService();
-#endif
virtual WebKit::WebSpeechInputController* speechInputController(
WebKit::WebSpeechInputListener* listener);
virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
@@ -1395,10 +1393,11 @@ class RenderView : public RenderWidget,
scoped_refptr<AudioMessageFilter> audio_message_filter_;
- // The geolocation dispatcher attached to this view, lazily initialized.
-#if ENABLE_CLIENT_BASED_GEOLOCATION
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ // the geolocation dispatcher attached to this view, lazily initialized.
scoped_ptr<GeolocationDispatcher> geolocation_dispatcher_;
#else
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
scoped_ptr<GeolocationDispatcherOld> geolocation_dispatcher_;
#endif
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ca5d63a..1243ee7 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -31,6 +31,7 @@
#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"
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
#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"
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index 29d3d1f..731e2bd 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -373,9 +373,7 @@ public:
WebKit::WebSpeechInputListener* listener);
WebKit::WebSpeechInputControllerMock* speech_input_controller_mock();
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
WebKit::WebGeolocationClientMock* geolocation_client_mock();
-#endif
protected:
void CreateDevToolsClient(TestShellDevToolsAgent* agent);
@@ -460,10 +458,8 @@ private:
device_orientation_client_mock_;
scoped_ptr<WebKit::WebSpeechInputControllerMock>
speech_input_controller_mock_;
-
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
scoped_ptr<WebKit::WebGeolocationClientMock> geolocation_client_mock_;
-#endif
+
const TestParams* test_params_;
// True while a test is preparing to run
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 7bc87e4..c811015 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -655,15 +655,25 @@ WebNotificationPresenter* TestWebViewDelegate::notificationPresenter() {
return shell_->notification_presenter();
}
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
WebKit::WebGeolocationClient* TestWebViewDelegate::geolocationClient() {
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
return shell_->geolocation_client_mock();
-}
#else
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
+ NOTREACHED();
+ return 0;
+#endif
+}
+
WebKit::WebGeolocationService* TestWebViewDelegate::geolocationService() {
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ NOTREACHED();
+ return 0;
+#else
return GetTestGeolocationService();
-}
#endif
+}
+
WebKit::WebDeviceOrientationClient*
TestWebViewDelegate::deviceOrientationClient() {
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index a4de21e..6283767 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -140,11 +140,12 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
virtual void focusAccessibilityObject(
const WebKit::WebAccessibilityObject& object);
virtual WebKit::WebNotificationPresenter* notificationPresenter();
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- WebKit::WebGeolocationClient* geolocationClient();
-#else
+
+ virtual WebKit::WebGeolocationClient* geolocationClient();
+
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
virtual WebKit::WebGeolocationService* geolocationService();
-#endif
+
virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
virtual WebKit::WebSpeechInputController* speechInputController(
WebKit::WebSpeechInputListener*);
@@ -466,9 +467,8 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// The mock spellchecker used in TestWebViewDelegate::spellCheck().
MockSpellCheck mock_spellcheck_;
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+ // TODO(jknotten): Remove once building with ENABLE_CLIENT_BASED_GEOLOCATION.
scoped_ptr<TestGeolocationService> test_geolocation_service_;
-#endif
DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate);
};