| Index: chrome/browser/tab_contents/tab_contents.cc
|
| diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
|
| index c8d3e95d8f1aa300663c86b12b75dd6ffc300308..6f7071f2f9fafde9d17dd87ac9f2dfff43ad18db 100644
|
| --- a/chrome/browser/tab_contents/tab_contents.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents.cc
|
| @@ -1309,6 +1309,11 @@ void TabContents::ClearBlockedContentSettings() {
|
| content_blocked_[i] = false;
|
| }
|
|
|
| +// Resets the |geolocation_settings_| map.
|
| +void TabContents::ClearGeolocationContentSettings() {
|
| + geolocation_content_settings_.clear();
|
| +}
|
| +
|
| // Notifies the RenderWidgetHost instance about the fact that the page is
|
| // loading, or done loading and calls the base implementation.
|
| void TabContents::SetIsLoading(bool is_loading,
|
| @@ -1496,6 +1501,7 @@ void TabContents::DidNavigateMainFramePostCommit(
|
|
|
| // Clear "blocked" flags.
|
| ClearBlockedContentSettings();
|
| + ClearGeolocationContentSettings();
|
| if (delegate_)
|
| delegate_->OnBlockedContentChange(this);
|
| }
|
| @@ -2027,6 +2033,15 @@ void TabContents::OnContentBlocked(ContentSettingsType type) {
|
| delegate_->OnBlockedContentChange(this);
|
| }
|
|
|
| +void TabContents::OnGeolocationPermissionSet(const GURL& requesting_origin,
|
| + bool allowed) {
|
| + geolocation_content_settings_[requesting_origin] =
|
| + allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
|
| + // TODO(bulach): rename OnBlockedContentChange to OnContentSettingsChange.
|
| + if (delegate_)
|
| + delegate_->OnBlockedContentChange(this);
|
| +}
|
| +
|
| RenderViewHostDelegate::View* TabContents::GetViewDelegate() {
|
| return view_.get();
|
| }
|
|
|