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

Unified Diff: chrome/renderer/render_view.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: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index f5558ef2298ab4c953c753330097310bf6762047..36489fd6cc72970fb29145e029247f2ab4a06ef2 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -62,7 +62,11 @@
#include "chrome/renderer/extensions/renderer_extension_bindings.h"
#include "chrome/renderer/external_host_bindings.h"
#include "chrome/renderer/external_popup_menu.h"
+#if ENABLE_CLIENT_BASED_GEOLOCATION
+#include "chrome/renderer/geolocation_dispatcher.h"
+#else
#include "chrome/renderer/geolocation_dispatcher_old.h"
+#endif
#include "chrome/renderer/ggl/ggl.h"
#include "chrome/renderer/localized_error.h"
#include "chrome/renderer/media/audio_renderer_impl.h"
@@ -5581,12 +5585,20 @@ void RenderView::OnPageTranslated() {
autofill_helper_->FrameContentsAvailable(frame);
}
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+WebKit::WebGeolocationClient* RenderView::geolocationClient()
+{
+ if (!geolocation_dispatcher_.get())
+ geolocation_dispatcher_.reset(new GeolocationDispatcher(this));
+ return geolocation_dispatcher_.get();
+}
+#else
WebKit::WebGeolocationService* RenderView::geolocationService() {
if (!geolocation_dispatcher_.get())
geolocation_dispatcher_.reset(new GeolocationDispatcherOld(this));
return geolocation_dispatcher_.get();
}
-
+#endif
bulach 2010/12/07 11:18:42 \n
WebKit::WebSpeechInputController* RenderView::speechInputController(
WebKit::WebSpeechInputListener* listener) {
if (!speech_input_dispatcher_.get())

Powered by Google App Engine
This is Rietveld 408576698