| Index: chrome/browser/tab_contents/tab_contents.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/tab_contents.cc (revision 23543)
|
| +++ chrome/browser/tab_contents/tab_contents.cc (working copy)
|
| @@ -35,6 +35,7 @@
|
| #include "chrome/browser/renderer_host/render_widget_host_view.h"
|
| #include "chrome/browser/renderer_host/resource_request_details.h"
|
| #include "chrome/browser/renderer_host/web_cache_manager.h"
|
| +#include "chrome/browser/tab_contents/geoloc_infobar_delegate.h"
|
| #include "chrome/browser/tab_contents/infobar_delegate.h"
|
| #include "chrome/browser/tab_contents/interstitial_page.h"
|
| #include "chrome/browser/tab_contents/navigation_entry.h"
|
| @@ -60,6 +61,7 @@
|
| #include "net/base/net_errors.h"
|
| #include "net/base/net_util.h"
|
| #include "net/base/registry_controlled_domain.h"
|
| +#include "webkit/chaos/GeolocationPowerbox.h"
|
| #include "webkit/glue/password_form.h"
|
| #include "webkit/glue/webpreferences.h"
|
|
|
| @@ -2091,6 +2093,28 @@
|
| view_->GetTopLevelNativeWindow(), NULL);
|
| }
|
|
|
| +void TabContents::ChooseGeolocationProvider(const GURL &url) {
|
| + WebCore::GeolocationPowerbox::ProviderId provider_id
|
| + = WebCore::GeolocationBrowserPowerbox::powerbox.findDecision(url);
|
| + if (provider_id
|
| + != WebCore::GeolocationPowerbox::NO_PROVIDER_FOUND) {
|
| + GeolocationProviderChosen(provider_id);
|
| + return;
|
| + }
|
| +
|
| + geolocation_url_ = url;
|
| +
|
| + LOG(WARNING) << "Pop up infobar";
|
| + AddInfoBar(new GeolocInfoBarDelegate(this));
|
| +}
|
| +
|
| +void TabContents::GeolocationProviderChosen(
|
| + WebCore::GeolocationPowerbox::ProviderId provider_id) {
|
| + WebCore::GeolocationBrowserPowerbox::powerbox.addDecision(geolocation_url_,
|
| + provider_id);
|
| + render_view_host()->GeolocationProviderChosen(provider_id);
|
| +}
|
| +
|
| void TabContents::RunJavaScriptMessage(
|
| const std::wstring& message,
|
| const std::wstring& default_prompt,
|
|
|