| 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;
|
|
|