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

Unified Diff: chrome/renderer/render_view.cc

Issue 160084: Chaos geolocation demo, non-WebKit part. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months 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
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/chaos/Chaos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 23543)
+++ chrome/renderer/render_view.cc (working copy)
@@ -73,6 +73,7 @@
#include "webkit/api/public/WebVector.h"
#include "webkit/default_plugin/default_plugin_shared.h"
#include "webkit/glue/glue_serialize.h"
+#include "webkit/glue/glue_util.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/dom_serializer.h"
#include "webkit/glue/image_decoder.h"
@@ -400,6 +401,8 @@
IPC_MESSAGE_HANDLER(ViewMsg_SetAltErrorPageURL, OnSetAltErrorPageURL)
IPC_MESSAGE_HANDLER(ViewMsg_InstallMissingPlugin, OnInstallMissingPlugin)
IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse)
+ IPC_MESSAGE_HANDLER(ViewMsg_ChooseGeolocationProviderResponse,
+ OnChooseGeolocationProviderResponse)
IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateBackForwardListCount,
OnUpdateBackForwardListCount)
@@ -1840,6 +1843,14 @@
default_filename));
}
+void RenderView::chooseGeolocationProvider(
+ ChooseGeolocationProviderCallback *geolocation_provider_callback,
+ const WebCore::KURL &url) {
+ geolocation_provider_callback_.reset(geolocation_provider_callback);
+ Send(new ViewHostMsg_ChooseGeolocationProvider(
+ routing_id_, webkit_glue::KURLToGURL(url)));
+}
+
void RenderView::AddMessageToConsole(WebView* webview,
const std::wstring& message,
unsigned int line_no,
@@ -2760,6 +2771,17 @@
file_chooser_.reset();
}
+void RenderView::OnChooseGeolocationProviderResponse(int provider_id) {
+ // FIXME(benl): can this happen?
+ if (!geolocation_provider_callback_.get())
+ return;
+
+ geolocation_provider_callback_->OnProviderChosen(
+ (WebCore::GeolocationPowerbox::ProviderId)provider_id);
+ // We don't reset, because if the user asks us to re-choose, we need this again.
+ // geolocation_provider_callback_.reset();
+}
+
void RenderView::OnEnableViewSourceMode() {
if (!webview())
return;
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/chaos/Chaos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698